From 785656d149d920a1f4aeeedef75039015a2a19d5 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Tue, 20 Nov 2012 16:21:47 +0100 Subject: [PATCH] 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 file changed, 5 insertions(+), 4 deletions(-) diff --git a/extensions/alternate-tab/extension.js b/extensions/alternate-tab/extension.js index 52ddd4e4..bfd3015f 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