Skip to content

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 gnome-shell#5368 (closed)

Merge request reports