removed shiftview(), if you scroll the views in the tag area, you can also use Button1 instead 4b9337a0
removed focusclient([-]1) bound to scroll wheel - if you slightly move the mouse you will focus the first client anways which is in the way
Anselm R. Garbe · 2007-07-28 12:58 3 file(s) · +2 −29
dwm.h +0 −1
144 144
void toggletag(const char *arg);	/* toggles sel tags with arg's index */
145 145
void toggleview(const char *arg);	/* toggles the tag with arg's index (in)visible */
146 146
void view(const char *arg);		/* views the tag with arg's index */
147 -
void shiftview(const char *arg);        /* views next(1)/previous(-1) tag */
148 147
149 148
/* util.c */
150 149
void *emallocz(unsigned int size);	/* allocates zero-initialized memory, exits on error */
event.c +2 −10
16 16
17 17
KEYS
18 18
19 -
#define CLEANMASK(mask) (mask & ~(numlockmask | LockMask))
19 +
#define CLEANMASK(mask)		(mask & ~(numlockmask | LockMask))
20 20
#define MOUSEMASK		(BUTTONMASK | PointerMotionMask)
21 21
22 22
static Client *
135 135
					else
136 136
						toggleview(buf);
137 137
				}
138 -
				else if(ev->button == Button4)
139 -
					shiftview("-1");
140 -
				else if(ev->button == Button5)
141 -
					shiftview("1");
142 138
				return;
143 139
			}
144 140
		}
145 -
		if(ev->x < x + blw && ev->button == Button1)
141 +
		if((ev->x < x + blw) && ev->button == Button1)
146 142
			setlayout(NULL);
147 -
		else if(ev->button == Button4)
148 -
			focusclient("-1");
149 -
		else if(ev->button == Button5)
150 -
			focusclient("1");
151 143
	}
152 144
	else if((c = getclient(ev->window))) {
153 145
		focus(c);
tag.c +0 −18
99 99
			c->tags[i] = seltag[i];
100 100
}
101 101
102 -
void 
103 -
shiftview(const char *arg) {
104 -
	int i, j;
105 -
106 -
	for(i = 0; !seltag[i]; i++);
107 -
	for(j = i + 1; j < ntags && !seltag[j]; j++);
108 -
	if(j < ntags)
109 -
		return; /* more than one tag selected */
110 -
	seltag[i] = False;
111 -
	i += arg ? atoi(arg) : 0;
112 -
	if(i < 0)
113 -
		i = ntags - 1;
114 -
	else if(i >= ntags)
115 -
		i = 0;
116 -
	seltag[i] = True;
117 -
	lt->arrange();
118 -
}
119 -
120 102
void
121 103
tag(const char *arg) {
122 104
	int i;