diff options
| -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); |
