Improved upon last commit

This commit is contained in:
Kris Maglione 2007-02-09 16:42:03 -05:00
parent 12bbd9290f
commit c2f3587ef0
1 changed files with 3 additions and 5 deletions

View File

@ -35,10 +35,8 @@ buttonrelease(XEvent *e) {
return; 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); write_event("ClientClick 0x%x %d\n", f->client->win, ev->button);
XAllowEvents(blz.dpy, ReplayPointer, ev->time);
}
} }
static void static void
@ -49,7 +47,7 @@ buttonpress(XEvent *e) {
ev = &e->xbutton; ev = &e->xbutton;
if((f = frame_of_win(ev->window))) { if((f = frame_of_win(ev->window))) {
inclient = ispointinrect(ev->x, ev->y, &f->client->rect); inclient = (ev->subwindow == f->client->win);
ev->state &= valid_mask; ev->state &= valid_mask;
if((ev->state & def.mod) == def.mod) { if((ev->state & def.mod) == def.mod) {
switch(ev->button) { switch(ev->button) {
@ -65,7 +63,7 @@ buttonpress(XEvent *e) {
frame_to_top(f); frame_to_top(f);
focus(f->client, True); focus(f->client, True);
default: default:
XAllowEvents(blz.dpy, ReplayPointer, ev->time); XAllowEvents(blz.dpy, AsyncPointer, ev->time);
break; break;
} }
}else{ }else{