event: push button state correctly to mouse grabber
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
5ad3eb8021
commit
63a7b50531
6
event.c
6
event.c
|
@ -132,15 +132,15 @@ event_handle_button(void *data, xcb_connection_t *connection, xcb_button_press_e
|
|||
client_t *c;
|
||||
wibox_t *wibox;
|
||||
|
||||
if(event_handle_mousegrabber(ev->root_x, ev->root_y, 1 << (ev->detail - 1 + 8)))
|
||||
return 0;
|
||||
|
||||
/* ev->state is
|
||||
* button status (8 bits) + modifiers status (8 bits)
|
||||
* we don't care for button status that we get, especially on release, so
|
||||
* drop them */
|
||||
ev->state &= 0x00ff;
|
||||
|
||||
if(event_handle_mousegrabber(ev->root_x, ev->root_y, ev->state))
|
||||
return 0;
|
||||
|
||||
if((wibox = wibox_getbywin(ev->event))
|
||||
|| (wibox = wibox_getbywin(ev->child)))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue