Another go at preventing freeze

This commit is contained in:
Kris Maglione 2007-02-09 14:06:24 -05:00
parent 8541f1043c
commit 0ac783e033
2 changed files with 7 additions and 4 deletions

View File

@ -51,7 +51,9 @@ 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, False, ButtonMask,
XGrabButton(blz.dpy, Button1, AnyModifier, c->framewin, False, ButtonMask,
GrabModeSync, GrabModeSync, None, None);
XGrabButton(blz.dpy, Button3, AnyModifier, c->framewin, False, ButtonMask,
GrabModeSync, GrabModeSync, None, None);
c->gc = XCreateGC(blz.dpy, c->framewin, 0, 0);
XSync(blz.dpy, False);

View File

@ -35,8 +35,10 @@ buttonrelease(XEvent *e) {
return;
}
}
else if((f = frame_of_win(ev->window)))
else if((f = frame_of_win(ev->window))) {
write_event("ClientClick 0x%x %d\n", f->client->win, ev->button);
XAllowEvents(blz.dpy, ReplayPointer, ev->time);
}
}
static void
@ -73,8 +75,7 @@ buttonpress(XEvent *e) {
}
XAllowEvents(blz.dpy, ReplayPointer, ev->time);
}
}else
XAllowEvents(blz.dpy, ReplayPointer, ev->time);
}
XSync(blz.dpy, False);
}