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 <mceier@gmail.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
cbf55449a3
commit
c40609642b
7
event.c
7
event.c
|
@ -536,11 +536,8 @@ event_handle_focusin(void *data __attribute__ ((unused)),
|
||||||
xcb_focus_in_event_t *ev)
|
xcb_focus_in_event_t *ev)
|
||||||
{
|
{
|
||||||
/* filter focus-in events */
|
/* filter focus-in events */
|
||||||
if(ev->mode != XCB_NOTIFY_MODE_NORMAL
|
if (ev->detail != XCB_NOTIFY_DETAIL_NONLINEAR)
|
||||||
&& (ev->detail == XCB_NOTIFY_DETAIL_VIRTUAL
|
return 0;
|
||||||
|| ev->detail == XCB_NOTIFY_DETAIL_NONLINEAR_VIRTUAL
|
|
||||||
|| ev->detail == XCB_NOTIFY_DETAIL_POINTER))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
client_t *c;
|
client_t *c;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue