applied restack patch of anydot, with slight changes

This commit is contained in:
Anselm R. Garbe 2007-06-06 11:43:14 +02:00
parent 4bf3b01953
commit c95bf3db9d

View File

@ -164,6 +164,7 @@ void
restack(void) { restack(void) {
Client *c; Client *c;
XEvent ev; XEvent ev;
XWindowChanges wc;
drawstatus(); drawstatus();
if(!sel) if(!sel)
@ -171,12 +172,17 @@ restack(void) {
if(sel->isfloating || lt->arrange == floating) if(sel->isfloating || lt->arrange == floating)
XRaiseWindow(dpy, sel->win); XRaiseWindow(dpy, sel->win);
if(lt->arrange != floating) { if(lt->arrange != floating) {
if(!sel->isfloating) wc.stack_mode = Below;
XLowerWindow(dpy, sel->win); wc.sibling = barwin;
if(!sel->isfloating) {
XConfigureWindow(dpy, sel->win, CWSibling | CWStackMode, &wc);
wc.sibling = sel->win;
}
for(c = nexttiled(clients); c; c = nexttiled(c->next)) { for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
if(c == sel) if(c == sel)
continue; continue;
XLowerWindow(dpy, c->win); XConfigureWindow(dpy, c->win, CWSibling | CWStackMode, &wc);
wc.sibling = c->win;
} }
} }
XSync(dpy, False); XSync(dpy, False);