From 63a7b50531c8e3873e5ddf7b9f226eb3aa634cea Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 29 Apr 2009 17:20:12 +0200 Subject: [PATCH] event: push button state correctly to mouse grabber Signed-off-by: Julien Danjou --- event.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/event.c b/event.c index 79c57bcd4..de7426927 100644 --- a/event.c +++ b/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))) {