event: push button state correctly to mouse grabber

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-04-29 17:20:12 +02:00
parent 5ad3eb8021
commit 63a7b50531
1 changed files with 3 additions and 3 deletions

View File

@ -132,15 +132,15 @@ event_handle_button(void *data, xcb_connection_t *connection, xcb_button_press_e
client_t *c; client_t *c;
wibox_t *wibox; wibox_t *wibox;
if(event_handle_mousegrabber(ev->root_x, ev->root_y, 1 << (ev->detail - 1 + 8)))
return 0;
/* ev->state is /* ev->state is
* button status (8 bits) + modifiers status (8 bits) * button status (8 bits) + modifiers status (8 bits)
* we don't care for button status that we get, especially on release, so * we don't care for button status that we get, especially on release, so
* drop them */ * drop them */
ev->state &= 0x00ff; ev->state &= 0x00ff;
if(event_handle_mousegrabber(ev->root_x, ev->root_y, ev->state))
return 0;
if((wibox = wibox_getbywin(ev->event)) if((wibox = wibox_getbywin(ev->event))
|| (wibox = wibox_getbywin(ev->child))) || (wibox = wibox_getbywin(ev->child)))
{ {