From 7c7ceb1444bc0cc5f5ab6e9c5e383dd301dce1ec Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 19 May 2012 20:20:46 +0200 Subject: [PATCH] event: Properly ignore the "send event" flag Thanks to muni who managed to crash his WM with conky. When conky runs in its own window, clicking on it will sometimes (depending on the conkyrc) use XSendEvent() to forward the event to the WM. Signed-off-by: Uli Schlachter --- event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/event.c b/event.c index c28a3ca2..2db7f751 100644 --- a/event.c +++ b/event.c @@ -135,7 +135,7 @@ static void event_emit_button(xcb_button_press_event_t *ev) { const char *name; - switch(ev->response_type) + switch(XCB_EVENT_RESPONSE_TYPE(ev)) { case XCB_BUTTON_PRESS: name = "button::press"; @@ -172,7 +172,7 @@ event_update_button_state(uint8_t response_type, uint8_t button) return; } - switch(response_type) + switch(response_type & XCB_EVENT_RESPONSE_TYPE_MASK) { case XCB_BUTTON_PRESS: /* Set the (button-1)-st bit */