Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
dwm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
applied Szabolcs proposal to simplify setlayout()
[dwm.git]
/
layout.c
diff --git
a/layout.c
b/layout.c
index
0f17b69
..
47e9e49
100644
(file)
--- a/
layout.c
+++ b/
layout.c
@@
-189,7
+189,6
@@
restack(void) {
XLowerWindow(dpy, c->win);
}
}
XLowerWindow(dpy, c->win);
}
}
- XRaiseWindow(dpy, barwin);
XSync(dpy, False);
while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
}
XSync(dpy, False);
while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
}
@@
-199,11
+198,9
@@
setlayout(const char *arg) {
int i;
if(!arg) {
int i;
if(!arg) {
- for(i = 0; i < nlayouts && lt != &layout[i]; i++);
- if(i == nlayouts - 1)
- lt = &layout[0];
- else
- lt = &layout[++i];
+ lt++;
+ if(lt == layout + nlayouts)
+ lt = layout;
}
else {
i = atoi(arg);
}
else {
i = atoi(arg);