Awesome already handles all focus changes explicitely itself. The focusin handler is responsible for a bug where awesome is not able to focus the correct client on fast focus switches (occuring due to sloppy focus). Awesome sets the focus to some clients in a fast sequence and then the xcb focusin handler updates the focus for the wrong clients and so the wrong window receives the focus.
Signed-off-by: Stefan Haller <hali...@googlemail.com> --- event.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/event.c b/event.c index af08cfd..4685fc3 100644 --- a/event.c +++ b/event.c @@ -497,42 +497,6 @@ event_handle_enternotify(xcb_enter_notify_event_t *ev) } } -/** The focus in event handler. - * \param ev The event. - */ -static void -event_handle_focusin(xcb_focus_in_event_t *ev) -{ - if (ev->mode == XCB_NOTIFY_MODE_GRAB - || ev->mode == XCB_NOTIFY_MODE_UNGRAB) - /* Ignore focus changes due to keyboard grabs */ - return; - - /* Events that we are interested in: */ - switch(ev->detail) - { - /* These are events that jump between root windows. - */ - case XCB_NOTIFY_DETAIL_ANCESTOR: - case XCB_NOTIFY_DETAIL_INFERIOR: - - /* These are events that jump between clients. - * Virtual events ensure we always get an event on our top-level window. - */ - case XCB_NOTIFY_DETAIL_NONLINEAR_VIRTUAL: - case XCB_NOTIFY_DETAIL_NONLINEAR: - { - client_t *c; - - if((c = client_getbywin(ev->event))) - client_focus_update(c); - } - /* all other events are ignored */ - default: - break; - } -} - /** The expose event handler. * \param ev The event. */ @@ -816,7 +780,6 @@ void event_handle(xcb_generic_event_t *event) EVENT(XCB_ENTER_NOTIFY, event_handle_enternotify); EVENT(XCB_CLIENT_MESSAGE, event_handle_clientmessage); EVENT(XCB_EXPOSE, event_handle_expose); - EVENT(XCB_FOCUS_IN, event_handle_focusin); EVENT(XCB_KEY_PRESS, event_handle_key); EVENT(XCB_KEY_RELEASE, event_handle_key); EVENT(XCB_LEAVE_NOTIFY, event_handle_leavenotify); -- 1.8.1.1 -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.