[gnome-shell-extensions] alternate-tab: don't show attached modal dialogs



commit 785656d149d920a1f4aeeedef75039015a2a19d5
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Nov 20 16:21:47 2012 +0100

    alternate-tab: don't show attached modal dialogs
    
    Attached modal dialogs cannot be focused on their own, so the expected
    interaction is to choose their parent instead.

 extensions/alternate-tab/extension.js |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/extensions/alternate-tab/extension.js b/extensions/alternate-tab/extension.js
index 52ddd4e..bfd3015 100644
--- a/extensions/alternate-tab/extension.js
+++ b/extensions/alternate-tab/extension.js
@@ -119,13 +119,14 @@ const AltTabPopup = new Lang.Class({
 	    });
 	} else {
 	    windows = global.display.get_tab_list(Meta.TabList.NORMAL_ALL, global.screen,
-						      global.screen.get_active_workspace());
+						  global.screen.get_active_workspace());
 	}
 
-        if (!windows.length) {
-            this.destroy();
+        // Filter away attached modal dialogs (switch to their parents instead)
+        windows = windows.filter(function(win) { return !win.is_attached_dialog(); });
+
+        if (windows.length == 0)
             return false;
-        }
 
         if (!Main.pushModal(this.actor)) {
             // Probably someone else has a pointer grab, try again with keyboard only



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