[hackers] [wmii] Finally fix the freezing bug, I hope

From: Kris Maglione <jg_AT_suckless.org>
Date: Sat Feb 10 00:08:25 2007

changeset: 1817:835f65c5b9b1
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Fri Feb 09 18:07:59 2007 -0500
summary: Finally fix the freezing bug, I hope

diff -r e2a9528a4c24 -r 835f65c5b9b1 client.c
--- a/client.c Fri Feb 09 17:31:40 2007 -0500
+++ b/client.c Fri Feb 09 18:07:59 2007 -0500
@@ -51,10 +51,8 @@ create_client(Window w, XWindowAttribute
                         DefaultDepth(blz.dpy, blz.screen), CopyFromParent,
                         DefaultVisual(blz.dpy, blz.screen),
                         CWOverrideRedirect | CWBackPixmap | CWEventMask, &fwa);
- XGrabButton(blz.dpy, Button1, AnyModifier, c->framewin, True, ButtonPressMask,
- GrabModeSync, GrabModeAsync, None, None);
- XGrabButton(blz.dpy, Button3, AnyModifier, c->framewin, True, ButtonPressMask,
- GrabModeSync, GrabModeAsync, None, None);
+ XGrabButton(blz.dpy, AnyButton, AnyModifier, c->framewin, True, ButtonMask,
+ GrabModeSync, GrabModeSync, None, None);
         c->gc = XCreateGC(blz.dpy, c->framewin, 0, 0);
         XSync(blz.dpy, False);
         for(t=&client; *t; t=&(*t)->next);
diff -r e2a9528a4c24 -r 835f65c5b9b1 event.c
--- a/event.c Fri Feb 09 17:31:40 2007 -0500
+++ b/event.c Fri Feb 09 18:07:59 2007 -0500
@@ -48,7 +48,6 @@ buttonpress(XEvent *e) {
         ev = &e->xbutton;
         if((f = frame_of_win(ev->window))) {
                 inclient = (ev->subwindow == f->client->win);
- ev->state &= valid_mask;
                 if((ev->state & def.mod) == def.mod) {
                         switch(ev->button) {
                         case Button1:
@@ -62,15 +61,12 @@ buttonpress(XEvent *e) {
                                                 quadofcoord(&f->client->rect, ev->x, ev->y));
                                 frame_to_top(f);
                                 focus(f->client, True);
- default:
- XAllowEvents(blz.dpy, AsyncPointer, ev->time);
- break;
+ break;
+ default: break;
+ XAllowEvents(blz.dpy, ReplayPointer, CurrentTime);
                         }
                 }else{
- if(inclient)
- XAllowEvents(blz.dpy, ReplayPointer, ev->time);
- else
- XAllowEvents(blz.dpy, AsyncPointer, ev->time);
+ XAllowEvents(blz.dpy, ReplayPointer, CurrentTime);
                         if(ev->button == Button1) {
                                 if(frame_to_top(f) || f->client != sel_client())
                                         focus(f->client, True);
@@ -79,7 +75,7 @@ buttonpress(XEvent *e) {
                         }
                 }
         }else
- XAllowEvents(blz.dpy, AsyncPointer, ev->time);
+ XAllowEvents(blz.dpy, ReplayPointer, CurrentTime);
 }
 
 static void
Received on Sat Feb 10 2007 - 00:08:25 UTC

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