GNOME Bugzilla – Bug 602669
"confirm dialogs when closing" doesn't work totally
Last modified: 2014-06-24 01:43:20 UTC
after bug 602532 was fixed, it still remains an issue: 1/ Open gedit, and edit a document 2/ use the overview and try to close gedit 3/ you're switched back to the workspace with gedit asking to save your work, but do nothing. 4/ Now use the overview again, and try to close gedit: Result: nothing happens, Expected result: step 3
Created attachment 148347 [details] [review] [workspaces] Leave overview when closing windows with transients If a user ignores confirmation dialogues and tries to close the corresponding window again from the overview, nothing happens. This patch leaves the overview when the user tries to close a window which has modal transients.
Review of attachment 148347 [details] [review]: ::: js/ui/workspaces.js @@ +421,3 @@ + if (windows[i].meta_window.get_transient_for() == metaWindow + for (let i = 0; i < windows.length; i++) + let windows = global.get_windows(); Hmm...looping over all windows here is a bit ugly, but there aren't many good alternatives either. MetaGroup unfortunately isn't scriptable at the moment. You could potentially look up the ShellApp for the window, and then we could have shell_app_has_modal_window () or something.
(In reply to comment #3) > Review of attachment 148347 [details] [review]: > > ::: js/ui/workspaces.js > @@ +421,3 @@ > + if (windows[i].meta_window.get_transient_for() == metaWindow > + for (let i = 0; i < windows.length; i++) > + let windows = global.get_windows(); > > Hmm...looping over all windows here is a bit ugly, but there aren't many good > alternatives either. MetaGroup unfortunately isn't scriptable at the moment. > You could potentially look up the ShellApp for the window, and then we could > have shell_app_has_modal_window () or something. OK, I agree that that loop is pretty shitty - not quite sure though if I got your proposal right. You are not proposing shell_app_has_modal_window (app), but rather shell_app_has_modal_window (app, window), right?
*** Bug 650018 has been marked as a duplicate of this bug. ***
Addressed differently in bug 729886, closing.