applied sanders somepatches.patch 2dd5212a
Anselm R. Garbe · 2006-08-28 08:02 4 file(s) · +16 −8
config.default.h +1 −1
55 55
};
56 56
57 57
/* Query class:instance:title for regex matching info with following command:
58 -
 * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/{ printf("%s\n",$2) }' */
58 +
 * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */
59 59
#define RULES \
60 60
static Rule rule[] = { \
61 61
	/* class:instance:title regex	tags regex	isfloat */ \
draw.c +5 −4
97 97
	int i, x;
98 98
99 99
	dc.x = dc.y = 0;
100 -
	dc.w = bw;
101 100
102 -
	drawtext(NULL, dc.status, False);
103 101
	for(i = 0; i < ntags; i++) {
104 102
		dc.w = textw(tags[i]);
105 103
		if(seltag[i])
121 119
	}
122 120
	drawtext(stext, dc.status, False);
123 121
124 -
	if(sel && ((dc.w = dc.x - x) > bh)) {
122 +
	if((dc.w = dc.x - x) > bh) {
125 123
		dc.x = x;
126 -
		drawtext(sel->name, dc.sel, False);
124 +
		if(sel)
125 +
			drawtext(sel->name, dc.sel, False);
126 +
		else
127 +
			drawtext(NULL, dc.norm, False);
127 128
	}
128 129
	XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);
129 130
	XSync(dpy, False);
dwm.1 +6 −1
40 40
.TP
41 41
.B Button1
42 42
click on a tag label views all windows with that
43 -
.BR tag .
43 +
.BR tag ,
44 +
click on the mode label toggles between
45 +
.B tiled
46 +
and
47 +
.B floating
48 +
mode.
44 49
.TP
45 50
.B Button3
46 51
click on a tag label adds/removes all windows with that
event.c +4 −2
116 116
				return;
117 117
			}
118 118
		}
119 -
		if(ev->x < x + bmw)
120 -
			togglemode(NULL);
119 +
		if(ev->x < x + bmw) {
120 +
			if(ev->button == Button1)
121 +
				togglemode(NULL);
122 +
		}
121 123
	}
122 124
	else if((c = getclient(ev->window))) {
123 125
		focus(c);