AppSwitcherPopup: Activate only the selected window if any

If there's an explicitly selected window thumbnail we should bring up
only that particular window instead of all the application's windows.

https://bugzilla.gnome.org/show_bug.cgi?id=697480
This commit is contained in:
Rui Matos 2013-04-07 16:42:42 +02:00
parent 963905adcd
commit 2499f2ed80

View File

@ -233,8 +233,10 @@ const AppSwitcherPopup = new Lang.Class({
_finish : function(timestamp) {
let appIcon = this._items[this._selectedIndex];
let window = this._currentWindow > 0 ? this._currentWindow : 0;
appIcon.app.activate_window(appIcon.cachedWindows[window], timestamp);
if (this._currentWindow < 0)
appIcon.app.activate_full(-1, timestamp);
else
Main.activateWindow(appIcon.cachedWindows[this._currentWindow], timestamp);
this.parent();
},