Skip to content

window: Ignore hidden modals on focus

Florian Müllner requested to merge fmuellner/mutter:modal-crash into main

If a window has modal transients, we focus the most-recently focused transient instead of the window.

That behavior is generally reasonable, but it fails in the odd case where the transient is minimized. In that case, we want to move the focus away from the minimized transient, but then try to re-focus it when trying to focus the parent, until we eventually crash.

Address this by excluding hidden modals when focusing a window.

Related: gnome-shell#5581 (closed)

Merge request reports