wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 595d6cb8cadc22c54d31e34491951b7c540a9b65
parent 0cca58fe53a29390ef82fd19fe7d1271068e81cc
Author: Kris Maglione <jg@suckless.org>
Date:   Thu,  8 Feb 2007 00:05:27 -0500

Fix a bug that ostensibly prevents toggling layers when the mouse is over a floating client.


Diffstat:
area.c | 2--
client.c | 14++++++++++----
2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/area.c b/area.c @@ -380,7 +380,5 @@ select_area(Area *a, char *arg) { else write_event("FocusFloating\n"); v->sel = new; } - if(a->floating != new->floating) - v->revert = a; return nil; } diff --git a/client.c b/client.c @@ -136,10 +136,13 @@ focus_client(Client *c, Bool restack) { if(!sel_screen) return; f = c->sel; - v = f->area->view; + v = f->view; old = sel_client(); old_in_area = sel_client_of_area(f->area); old_a = v->sel; + + if(old_a->floating != f->area->floating) + v->revert = old_a; v->sel = f->area; f->area->sel = f; c->floating = f->area->floating; @@ -160,9 +163,12 @@ focus_client(Client *c, Bool restack) { draw_frame(c->sel); XSync(blz.dpy, False); if(old_a != v->sel) { - for(a = v->area, a_i = 0; a && a != v->sel; a = a->next, a_i++); - if(a_i) write_event("ColumnFocus %d\n", a_i); - else write_event("FocusFloating\n"); + for(a = v->area, a_i = 0; a; a = a->next, a_i++) + if(a == v->sel) break; + if(a_i) + write_event("ColumnFocus %d\n", a_i); + else + write_event("FocusFloating\n"); } write_event("ClientFocus 0x%x\n", c->win); }