[gnome-shell] [workspaces] Leave overview when closing windows with transients



commit af764ac582e4f08021e399b760c1401296337dbf
Author: Florian Müllner <fmuellner src gnome org>
Date:   Mon Nov 23 00:20:41 2009 +0100

    [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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=602669

 js/ui/workspaces.js |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspaces.js b/js/ui/workspaces.js
index 39f5ae3..a5b8635 100644
--- a/js/ui/workspaces.js
+++ b/js/ui/workspaces.js
@@ -424,6 +424,14 @@ WindowOverlay.prototype = {
         let metaWindow = this._windowClone.metaWindow;
         this._workspace = metaWindow.get_workspace();
 
+        let windows = global.get_windows();
+        for (let i = 0; i < windows.length; i++)
+            if (windows[i].meta_window.get_transient_for() == metaWindow
+                && windows[i].meta_window.is_modal()) {
+                this._windowClone.emit('selected');
+                return;
+            }
+
         this._windowAddedId = this._workspace.connect('window-added',
                                                       Lang.bind(this,
                                                                 this._onWindowAdded));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]