commit 3db63de615446e43fecc94463f6ed82062b10ac2
parent 7e36cfc20149530cdcf2beb70c5dc42814ca3ec2
Author: Kris Maglione <jg@suckless.org>
Date: Fri, 9 Feb 2007 18:16:15 -0500
Fix bug where clicking the unfocused titlebar triggered a window move until another click.
Diffstat:
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/client.c b/client.c
@@ -51,7 +51,7 @@ create_client(Window w, XWindowAttributes *wa) {
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 --git a/event.c b/event.c
@@ -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);
}