From c40609642bed3c88930d89c1c63ed868aec79d14 Mon Sep 17 00:00:00 2001 From: Mariusz Ceier Date: Fri, 3 Apr 2009 13:05:03 +0200 Subject: [PATCH] Fix for FocusIn event handler 10.7.1 chapter of X11 ([0]) describes many cases when FocusIn event is generated. We are interested only in one FocusIn event type - the one that is sent to window that gains focus. Previous 'if' failed in some cases ([1]), this one should be better. [0] http://cgit.freedesktop.org/xorg/doc/xorg-docs/plain/hardcopy/X11/xlib.PS.gz page 211 [1] http://www.mail-archive.com/awesome-devel@naquadah.org/msg01958.html Signed-off-by: Mariusz Ceier Signed-off-by: Julien Danjou --- event.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/event.c b/event.c index 7dedef1d4..6d7fe0c6a 100644 --- a/event.c +++ b/event.c @@ -536,11 +536,8 @@ event_handle_focusin(void *data __attribute__ ((unused)), xcb_focus_in_event_t *ev) { /* filter focus-in events */ - if(ev->mode != XCB_NOTIFY_MODE_NORMAL - && (ev->detail == XCB_NOTIFY_DETAIL_VIRTUAL - || ev->detail == XCB_NOTIFY_DETAIL_NONLINEAR_VIRTUAL - || ev->detail == XCB_NOTIFY_DETAIL_POINTER)) - return 0; + if (ev->detail != XCB_NOTIFY_DETAIL_NONLINEAR) + return 0; client_t *c;