summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-14 09:09:18 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-14 09:09:18 +0100
commite256afe31ef6a70eceb632ddfe717bfe6d8d9169 (patch)
treec42d38a69d3787c83176169d73be22e859da0f52 /main.c
parentmade configurerequest more tidy (diff)
downloaddwm-e256afe31ef6a70eceb632ddfe717bfe6d8d9169.tar.gz
dwm-e256afe31ef6a70eceb632ddfe717bfe6d8d9169.zip
made for/if/else constructs more consistent, some code polishing
Diffstat (limited to '')
-rw-r--r--main.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/main.c b/main.c
index 02475e0..94041c0 100644
--- a/main.c
+++ b/main.c
@@ -69,9 +69,8 @@ scan(void) {
69 wins = NULL; 69 wins = NULL;
70 if(XQueryTree(dpy, root, &d1, &d2, &wins, &num)) { 70 if(XQueryTree(dpy, root, &d1, &d2, &wins, &num)) {
71 for(i = 0; i < num; i++) { 71 for(i = 0; i < num; i++) {
72 if(!XGetWindowAttributes(dpy, wins[i], &wa)) 72 if(!XGetWindowAttributes(dpy, wins[i], &wa)
73 continue; 73 || wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1))
74 if(wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1))
75 continue; 74 continue;
76 if(wa.map_state == IsViewable) 75 if(wa.map_state == IsViewable)
77 manage(wins[i], &wa); 76 manage(wins[i], &wa);
@@ -104,12 +103,12 @@ setup(void) {
104 /* init modifier map */ 103 /* init modifier map */
105 numlockmask = 0; 104 numlockmask = 0;
106 modmap = XGetModifierMapping(dpy); 105 modmap = XGetModifierMapping(dpy);
107 for (i = 0; i < 8; i++) { 106 for (i = 0; i < 8; i++)
108 for (j = 0; j < modmap->max_keypermod; j++) { 107 for (j = 0; j < modmap->max_keypermod; j++) {
109 if(modmap->modifiermap[i * modmap->max_keypermod + j] == XKeysymToKeycode(dpy, XK_Num_Lock)) 108 if(modmap->modifiermap[i * modmap->max_keypermod + j]
109 == XKeysymToKeycode(dpy, XK_Num_Lock))
110 numlockmask = (1 << i); 110 numlockmask = (1 << i);
111 } 111 }
112 }
113 XFreeModifiermap(modmap); 112 XFreeModifiermap(modmap);
114 /* select for events */ 113 /* select for events */
115 wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask 114 wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask