GNOME Bugzilla – Bug 598995
Don't focus ancestor window on a different workspace
Last modified: 2020-11-06 20:09:46 UTC
Here's a fix for a quite old bug (at least since 2.16) involving moving a window with a modal dialog open to a different workspace. Reproduction instructions: - Open the Firefox 'Save As' dialog - Try to move the Firefox window to a different workspace using the window menu You'll observe that the dialog stays around (it actually gets moved and moves back) while the main window itself vanishes (it gets moved and moved back but not properly hidden/shown; switching to a different desktop and back will restore it to a non-confused state.) Seems like this should be already in the bug database somewhere but I looked for duplicates and couldn't find it.
Created attachment 145813 [details] [review] Don't focus ancestor window on a different workspace When we are moving a window with a modal dialog to a different workspace, meta_workspace_focus_default_window() can be called with 'not_this_one' being the focused modal dialog. Since the ancestor of that window is also being moved, we must not focus it as an alternative to the current window; this will cause windows to be moved back and Metacity to get into an inconsistent confused state. https://bugzilla.redhat.com/show_bug.cgi?id=237158
The patch fixes the bug I'm sure, but it feels ugly to me...why are we trying to focus the window we just moved? Anyways if it fixes the bug let's get it in, it shouldn't hurt anything.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years. If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/metacity/-/issues/ Thank you for reporting this issue and we are sorry it could not be fixed.