summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-03-14 14:35:45 +0000
committerAnselm R Garbe <garbeam@gmail.com>2008-03-14 14:35:45 +0000
commite237b2a76fb3dac1f43b91e5c7b6adb9ef04c9ed (patch)
treeda79e7fb7f8a05c3ec739aca9f62224d7adbbee7 /dwm.c
parentAdded tag 4.8 for changeset 607015ddb091 (diff)
downloaddwm-e237b2a76fb3dac1f43b91e5c7b6adb9ef04c9ed.tar.gz
dwm-e237b2a76fb3dac1f43b91e5c7b6adb9ef04c9ed.zip
some changes towards 4.9
Diffstat (limited to '')
-rw-r--r--dwm.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/dwm.c b/dwm.c
index a54329a..3f896dc 100644
--- a/dwm.c
+++ b/dwm.c
@@ -99,7 +99,9 @@ typedef struct {
99} Layout; 99} Layout;
100 100
101typedef struct { 101typedef struct {
102 const char *prop; 102 const char *class;
103 const char *instance;
104 const char *title;
103 const char *tag; 105 const char *tag;
104 Bool isfloating; 106 Bool isfloating;
105} Rule; 107} Rule;
@@ -161,7 +163,7 @@ void restack(void);
161void run(void); 163void run(void);
162void scan(void); 164void scan(void);
163void setclientstate(Client *c, long state); 165void setclientstate(Client *c, long state);
164void setdefaultgeoms(void); 166void setdefgeoms(void);
165void setlayout(const char *arg); 167void setlayout(const char *arg);
166void setup(void); 168void setup(void);
167void spawn(const char *arg); 169void spawn(const char *arg);
@@ -224,7 +226,6 @@ Display *dpy;
224DC dc = {0}; 226DC dc = {0};
225Layout *lt = NULL; 227Layout *lt = NULL;
226Window root, barwin; 228Window root, barwin;
227void (*setgeoms)(void) = setdefaultgeoms;
228 229
229/* configuration, allows nested code to access above variables */ 230/* configuration, allows nested code to access above variables */
230#include "config.h" 231#include "config.h"
@@ -244,9 +245,9 @@ applyrules(Client *c) {
244 XGetClassHint(dpy, c->win, &ch); 245 XGetClassHint(dpy, c->win, &ch);
245 for(i = 0; i < LENGTH(rules); i++) { 246 for(i = 0; i < LENGTH(rules); i++) {
246 r = &rules[i]; 247 r = &rules[i];
247 if(strstr(c->name, r->prop) 248 if(strstr(c->name, r->title)
248 || (ch.res_class && strstr(ch.res_class, r->prop)) 249 || (ch.res_class && r->class && strstr(ch.res_class, r->class))
249 || (ch.res_name && strstr(ch.res_name, r->prop))) 250 || (ch.res_name && r->instance && strstr(ch.res_name, r->instance)))
250 { 251 {
251 c->isfloating = r->isfloating; 252 c->isfloating = r->isfloating;
252 if(r->tag) { 253 if(r->tag) {
@@ -1051,7 +1052,7 @@ maprequest(XEvent *e) {
1051} 1052}
1052 1053
1053void 1054void
1054monocle(void) { 1055monocle(void) {
1055 Client *c; 1056 Client *c;
1056 1057
1057 for(c = clients; c; c = c->next) 1058 for(c = clients; c; c = c->next)
@@ -1390,7 +1391,7 @@ setclientstate(Client *c, long state) {
1390} 1391}
1391 1392
1392void 1393void
1393setdefaultgeoms(void) { 1394setdefgeoms(void) {
1394 1395
1395 /* screen dimensions */ 1396 /* screen dimensions */
1396 sx = 0; 1397 sx = 0;