summaryrefslogtreecommitdiff
path: root/src/core/window-private.h
diff options
context:
space:
mode:
authorJonas Dreßler <verdre@v0yd.nl>2022-11-06 12:38:35 +0100
committerRobert Mader <robert.mader@posteo.de>2022-12-03 09:37:38 +0000
commitdece0ab14dcdc45eb449bf6b1bba40a659610303 (patch)
tree96fa04dbe24c7c8284227df00ea0ed8f4737cc64 /src/core/window-private.h
parentdb3e5aa88c882b71ecd1348e90e787928ba2055e (diff)
downloadmutter-dece0ab14dcdc45eb449bf6b1bba40a659610303.tar.gz
window: Avoid focusing during workspace changes
We can land inside meta_window_focus() in the middle of changing the window workspace, because some signal handler of MetaWorkspace's "window-removed" signal triggers a focus. This can cause a crash in `g_assert (link)` when updating the MRU list because we still think we're on the old workspace when actually we are already removed from this workspaces MRU list. To avoid crashes like this, bail out of meta_window_focus() when we're in the middle of a workspace change. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5368 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2691> (cherry picked from commit 1816f21e216d9e8f8fdadddaaad23ae8b3a5a17a)
Diffstat (limited to 'src/core/window-private.h')
-rw-r--r--src/core/window-private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 61e80085d..35ebd925a 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -563,6 +563,8 @@ struct _MetaWindow
/* if TRUE, the we have the new form of sync request counter which
* also handles application frames */
guint extended_sync_request_counter : 1;
+
+ guint in_workspace_change : 1;
};
struct _MetaWindowClass