commit 33778e646a6c50d83b7441052b15a9b3b4bb8dc8
parent 6f11af4fbbf569007a737cc0d2426740663c7800
Author: Denis Grelich <denisg@suckless.org>
Date: Fri, 2 Feb 2007 23:32:38 +0100
fixed the stacking order on focus change in the floating layer. Welcome back Kris!
Diffstat:
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/view.c b/view.c
@@ -123,7 +123,7 @@ focus_view(WMScreen *s, View *v) {
f->rect.y);
}
if((c = sel_client()))
- focus_client(c, True);
+ focus_client(c, False);
draw_frames();
XSync(blz.dpy, False);
XUngrabServer(blz.dpy);
@@ -181,15 +181,20 @@ restack_view(View *v) {
}
for(a=v->area; a; a=a->next) {
if(a->frame) {
+ if(a == v->area) {
+ Frame **tf;
+ for(tf=&a->frame; *tf; tf=&(*tf)->anext)
+ if(*tf == a->sel) break;
+ *tf = a->sel->anext;
+ a->sel->anext = a->frame;
+ a->frame = a->sel;
+ }
wins[n++] = a->sel->client->framewin;
- for(f=a->frame; f; f=f->anext)
- if(f != a->sel) n++;
- i=n;
for(f=a->frame; f; f=f->anext) {
Client *c = f->client;
update_client_grab(c, (v->sel == a) && (a->sel == f));
if(f != a->sel)
- wins[--i] = c->framewin;
+ wins[n++] = c->framewin;
}
}
}