[hackers] [wmii] Fix bug where clicking the unfocused titlebar triggered a window move until another click.

From: Kris Maglione <jg_AT_suckless.org>
Date: Sat Feb 10 00:18:26 2007

changeset: 1819:7e0b21bccd96
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Fri Feb 09 18:16:15 2007 -0500
summary: Fix bug where clicking the unfocused titlebar triggered a window move until another click.

diff -r 39a8388deb06 -r 7e0b21bccd96 client.c
--- a/client.c Fri Feb 09 18:10:50 2007 -0500
+++ b/client.c Fri Feb 09 18:16:15 2007 -0500
@@ -51,7 +51,7 @@ create_client(Window w, XWindowAttribute
                         DefaultDepth(blz.dpy, blz.screen), CopyFromParent,
                         DefaultVisual(blz.dpy, blz.screen),
                         CWOverrideRedirect | CWBackPixmap | CWEventMask, &fwa);
- XGrabButton(blz.dpy, AnyButton, AnyModifier, c->framewin, True, ButtonMask,
+ XGrabButton(blz.dpy, AnyButton, AnyModifier, c->framewin, False, ButtonMask,
                         GrabModeSync, GrabModeSync, None, None);
         c->gc = XCreateGC(blz.dpy, c->framewin, 0, 0);
         XSync(blz.dpy, False);
diff -r 39a8388deb06 -r 7e0b21bccd96 event.c
--- a/event.c Fri Feb 09 18:10:50 2007 -0500
+++ b/event.c Fri Feb 09 18:16:15 2007 -0500
@@ -67,10 +67,12 @@ buttonpress(XEvent *e) {
                         }
                 }else{
                         if(ev->button == Button1) {
- if(frame_to_top(f) || f->client != sel_client())
- focus(f->client, True);
+ if(frame_to_top(f))
+ restack_view(f->view);
                                 if(!inclient)
                                         do_mouse_resize(f->client, CENTER);
+ if(f->client != sel_client())
+ focus(f->client, True);
                         }
                         XAllowEvents(blz.dpy, ReplayPointer, CurrentTime);
                 }
Received on Sat Feb 10 2007 - 00:18:26 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:07 UTC