[mutter/gnome-3-36] core: Be more selective looking for a focusable ancestor
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-36] core: Be more selective looking for a focusable ancestor
- Date: Tue, 22 Dec 2020 19:07:46 +0000 (UTC)
commit 3a44979c59c0dc54c08bf55a4ad1c893550c7e76
Author: Olivier Fourdan <ofourdan redhat com>
Date: Wed Dec 16 17:59:02 2020 +0100
core: Be more selective looking for a focusable ancestor
find_focusable_ancestor() may pick an ancestor window which is not
mapped or hidden, and setting focus on that window will fail.
Be a tad more selective when looking for a focusable ancestor, to reduce
the chance of meta_window_focus() not focusing the happy chosen one.
(cherry picked from commit 76d1a64204181f4da82d9614fe59daf350d5dfda)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1653>
src/core/workspace.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/core/workspace.c b/src/core/workspace.c
index 01b8487c49..b75fdfb09e 100644
--- a/src/core/workspace.c
+++ b/src/core/workspace.c
@@ -1332,7 +1332,10 @@ find_focusable_ancestor (MetaWindow *window,
{
MetaWorkspaceFocusableAncestorData *data = user_data;
- if (!window->unmanaging && meta_window_is_focusable (window) &&
+ if (!window->unmanaging &&
+ window->mapped &&
+ !window->hidden &&
+ meta_window_is_focusable (window) &&
meta_window_located_on_workspace (window, data->workspace) &&
meta_window_showing_on_its_workspace (window))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]