From fc8c91c0754d31c433fa8ea4fe1aef33c5ab1a7b Mon Sep 17 00:00:00 2001 From: Kimball Thurston Date: Tue, 22 Dec 2015 21:46:17 -0800 Subject: [PATCH] Fix focus handling with multiple awesome instances When there are multiple X11 screens (i.e. :0.0 and :0.1) for zaphod mode style X setups, this triggers a refresh of focus when the instance running on a particular root receives the mouse Fixes https://github.com/awesomeWM/awesome/issues/599. --- event.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/event.c b/event.c index 0d2f80903..8bea60ca8 100644 --- a/event.c +++ b/event.c @@ -580,6 +580,12 @@ event_handle_enternotify(xcb_enter_notify_event_t *ev) } lua_pop(L, 1); } + else if (ev->event == globalconf.screen->root) { + /* When there are multiple X screens with awesome running separate + * instances, reset focus. + */ + globalconf.focus.need_update = true; + } } /** The focus in event handler.