From 8dc9fcf1b95db927ce50a63c7e571fdb074529e8 Mon Sep 17 00:00:00 2001 From: "anselm@x200s.config" Date: Sun, 12 Jul 2009 22:49:06 +0100 Subject: mark broken clients as broken --- dwm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index bfeae15..553194d 100644 --- a/dwm.c +++ b/dwm.c @@ -237,6 +237,7 @@ static int xerrorstart(Display *dpy, XErrorEvent *ee); static void zoom(const Arg *arg); /* variables */ +static const char broken[] = "broken"; static char stext[256], ntext[8]; static int screen; static int sw, sh; /* X display screen geometry width, height */ @@ -275,6 +276,7 @@ struct NumTags { char limitexceeded[sizeof(unsigned int) * 8 < LENGTH(tags) ? -1 /* function implementations */ void applyrules(Client *c) { + const char *class, *instance; unsigned int i; const Rule *r; Monitor *m; @@ -283,11 +285,13 @@ applyrules(Client *c) { /* rule matching */ c->isfloating = c->tags = 0; if(XGetClassHint(dpy, c->win, &ch)) { + class = ch.res_class ? ch.res_class : broken; + instance = ch.res_name ? ch.res_name : broken; for(i = 0; i < LENGTH(rules); i++) { r = &rules[i]; if((!r->title || strstr(c->name, r->title)) - && (!r->class || (ch.res_class && strstr(ch.res_class, r->class))) - && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) + && (!r->class || strstr(class, r->class)) + && (!r->instance || strstr(instance, r->instance))) { c->isfloating = r->isfloating; c->tags |= r->tags; @@ -1819,6 +1823,8 @@ void updatetitle(Client *c) { if(!gettextprop(c->win, netatom[NetWMName], c->name, sizeof c->name)) gettextprop(c->win, XA_WM_NAME, c->name, sizeof c->name); + if(c->name[0] == '\0') /* hack to mark broken clients */ + strcpy(c->name, broken); } void -- cgit 1.4.1-2-gfad0 be3f56a7eea1541a274fbbf48'/>
path: root/tools/conf/etc/syslog-ng.conf
blob: cfb1c08c579d9eea430b63989005a8f6db1048d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188