From 35bf6b0d3678354d38a47a31a91c5fc3f954ba84 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 17 Apr 2010 16:58:35 -0400 Subject: [PATCH] [altTab] Raise all windows for an app https://bugzilla.gnome.org/show_bug.cgi?id=616051 --- js/ui/altTab.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/js/ui/altTab.js b/js/ui/altTab.js index b493b7c5f..654068d40 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -288,8 +288,10 @@ AltTabPopup.prototype = { // selected window; otherwise (eg, they click on an app while // !mouseActive) activate the first window of the clicked-on // app. - let window = (n == this._currentApp) ? this._currentWindow : 0; - Main.activateWindow(this._appIcons[n].cachedWindows[window]); + let appIcon = this._appIcons[n]; + let windowIndex = (n == this._currentApp) ? this._currentWindow : 0; + let window = appIcon.cachedWindows[windowIndex]; + appIcon.app.focus_window(window, global.get_current_time()); this.destroy(); }, @@ -301,7 +303,8 @@ AltTabPopup.prototype = { }, _windowActivated : function(thumbnailList, n) { - Main.activateWindow(this._appIcons[this._currentApp].cachedWindows[n]); + let appIcon = this._appIcons[this._currentApp]; + appIcon.app.focus_window(appIcon.cachedWindows[n]); this.destroy(); }, @@ -327,9 +330,9 @@ AltTabPopup.prototype = { }, _finish : function() { - let app = this._appIcons[this._currentApp]; - let window = app.cachedWindows[this._currentWindow]; - Main.activateWindow(window); + let appIcon = this._appIcons[this._currentApp]; + let window = appIcon.cachedWindows[this._currentWindow]; + appIcon.app.focus_window(window, global.get_current_time()); this.destroy(); },