aboutsummaryrefslogtreecommitdiffstats
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
parent64cfebc5e7d005dfff93a2468df860522fad085a (diff)
downloaddwm-e256afe31ef6a70eceb632ddfe717bfe6d8d9169.tar.zst
made for/if/else constructs more consistent, some code polishing
Diffstat (limited to 'main.c')
-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) {
wins = NULL;
if(XQueryTree(dpy, root, &d1, &d2, &wins, &num)) {
for(i = 0; i < num; i++) {
- if(!XGetWindowAttributes(dpy, wins[i], &wa))
- continue;
- if(wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1))
+ if(!XGetWindowAttributes(dpy, wins[i], &wa)
+ || wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1))
continue;
if(wa.map_state == IsViewable)
manage(wins[i], &wa);
@@ -104,12 +103,12 @@ setup(void) {
/* init modifier map */
numlockmask = 0;
modmap = XGetModifierMapping(dpy);
- for (i = 0; i < 8; i++) {
+ for (i = 0; i < 8; i++)
for (j = 0; j < modmap->max_keypermod; j++) {
- if(modmap->modifiermap[i * modmap->max_keypermod + j] == XKeysymToKeycode(dpy, XK_Num_Lock))
+ if(modmap->modifiermap[i * modmap->max_keypermod + j]
+ == XKeysymToKeycode(dpy, XK_Num_Lock))
numlockmask = (1 << i);
}
- }
XFreeModifiermap(modmap);
/* select for events */
wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask