After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 602669 - "confirm dialogs when closing" doesn't work totally
"confirm dialogs when closing" doesn't work totally
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 650018 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-11-22 21:00 UTC by Baptiste Mille-Mathias
Modified: 2014-06-24 01:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[workspaces] Leave overview when closing windows with transients (1.46 KB, patch)
2009-11-23 21:19 UTC, Florian Müllner
reviewed Details | Review

Description Baptiste Mille-Mathias 2009-11-22 21:00:58 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
Comment 1 Florian Müllner 2009-11-23 21:19:35 UTC
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.
Comment 2 Colin Walters 2009-11-24 00:34:48 UTC
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.
Comment 3 Colin Walters 2009-11-24 00:34:50 UTC
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.
Comment 4 Florian Müllner 2009-11-24 20:07:32 UTC
(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?
Comment 5 Florian Müllner 2011-05-12 09:49:44 UTC
*** Bug 650018 has been marked as a duplicate of this bug. ***
Comment 6 Florian Müllner 2014-06-24 01:43:20 UTC
Addressed differently in bug 729886, closing.