[hackers] wmii: new tip (= 1780)

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Thu, 08 Feb 2007 06:10:03 +0100

changeset: 1780:3a9a31a40860
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Thu Feb 08 00:05:27 2007 -0500
files: area.c client.c
description:
Fix a bug that ostensibly prevents toggling layers when the mouse is over a floating client.

diff -r 1d7c57eba0a7 -r 3a9a31a40860 area.c
--- a/area.c Wed Feb 07 23:23:18 2007 -0500
+++ b/area.c Thu Feb 08 00:05:27 2007 -0500
@@ -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 -r 1d7c57eba0a7 -r 3a9a31a40860 client.c
--- a/client.c Wed Feb 07 23:23:18 2007 -0500
+++ b/client.c Thu Feb 08 00:05:27 2007 -0500
@@ -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);
 }
Received on Thu Feb 08 2007 - 06:10:03 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:54:58 UTC