diff options
| author | Anselm R. Garbe <arg@suckless.org> | 2007-06-06 11:43:14 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@suckless.org> | 2007-06-06 11:43:14 +0200 |
| commit | c95bf3db9dcbf48428140bca6c2f86129977cc6c (patch) | |
| tree | bdc63edf9ee1c024c0927eeb219fae854330c99e | |
| parent | I change the style of init somewhat, init as early as possible. (diff) | |
| download | dwm-c95bf3db9dcbf48428140bca6c2f86129977cc6c.tar.gz dwm-c95bf3db9dcbf48428140bca6c2f86129977cc6c.zip | |
applied restack patch of anydot, with slight changes
Diffstat (limited to '')
| -rw-r--r-- | layout.c | 12 |
1 files changed, 9 insertions, 3 deletions
| @@ -164,6 +164,7 @@ void | |||
| 164 | restack(void) { | 164 | restack(void) { |
| 165 | Client *c; | 165 | Client *c; |
| 166 | XEvent ev; | 166 | XEvent ev; |
| 167 | XWindowChanges wc; | ||
| 167 | 168 | ||
| 168 | drawstatus(); | 169 | drawstatus(); |
| 169 | if(!sel) | 170 | if(!sel) |
| @@ -171,12 +172,17 @@ restack(void) { | |||
| 171 | if(sel->isfloating || lt->arrange == floating) | 172 | if(sel->isfloating || lt->arrange == floating) |
| 172 | XRaiseWindow(dpy, sel->win); | 173 | XRaiseWindow(dpy, sel->win); |
| 173 | if(lt->arrange != floating) { | 174 | if(lt->arrange != floating) { |
| 174 | if(!sel->isfloating) | 175 | wc.stack_mode = Below; |
| 175 | XLowerWindow(dpy, sel->win); | 176 | wc.sibling = barwin; |
| 177 | if(!sel->isfloating) { | ||
| 178 | XConfigureWindow(dpy, sel->win, CWSibling | CWStackMode, &wc); | ||
| 179 | wc.sibling = sel->win; | ||
| 180 | } | ||
| 176 | for(c = nexttiled(clients); c; c = nexttiled(c->next)) { | 181 | for(c = nexttiled(clients); c; c = nexttiled(c->next)) { |
| 177 | if(c == sel) | 182 | if(c == sel) |
| 178 | continue; | 183 | continue; |
| 179 | XLowerWindow(dpy, c->win); | 184 | XConfigureWindow(dpy, c->win, CWSibling | CWStackMode, &wc); |
| 185 | wc.sibling = c->win; | ||
| 180 | } | 186 | } |
| 181 | } | 187 | } |
| 182 | XSync(dpy, False); | 188 | XSync(dpy, False); |
