diff options
author | Balazs Endresz <[email protected]> | 2022-11-01 18:15:22 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-11-12 17:26:58 +0100 |
commit | 85ce3f72a00c620aa7631b33eba1e8f4fc8b131f (patch) | |
tree | 1a47d1ae6dd710e5f1d88835c5a3f5e0846da3b4 | |
parent | 63b00b9ee4d98cf9dc65b53ef1b27155da14d93e (diff) | |
download | marco-85ce3f72a00c620aa7631b33eba1e8f4fc8b131f.tar.bz2 marco-85ce3f72a00c620aa7631b33eba1e8f4fc8b131f.tar.xz |
Always bring into foreground the previous window after closing one
When opening and then closing certain applications
the focus was correctly regained by the previous window
but it wasn't brought into the foreground.
To fix this we call meta_workspace_focus_default_window() for both NotifyDetailNone and NotifyPointerRoot.
These two are always mentioned together in the X docs:
https://tronche.com/gui/x/xlib/events/input-focus/normal-and-grabbed.html
Some programs will have NotifyDetailNone when closed, while others end up with NotifyPointerRoot.
-rw-r--r-- | src/core/display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/display.c b/src/core/display.c index b56b3732..7edf41b8 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -2223,7 +2223,7 @@ static gboolean event_callback(XEvent* event, gpointer data) meta_event_detail_to_string (event->xfocus.detail)); if (event->type == FocusIn && - event->xfocus.detail == NotifyDetailNone) + (event->xfocus.detail == NotifyDetailNone || event->xfocus.detail == NotifyPointerRoot)) { meta_topic (META_DEBUG_FOCUS, "Focus got set to None, probably due to " |