[gnome-shell] altTab: Minor code cleanup



commit cb08bd2e2e3c27f5f6572213aa562fd01428de61
Author: Florian MÃllner <fmuellner gnome org>
Date:   Fri Nov 23 04:39:19 2012 +0100

    altTab: Minor code cleanup
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688913

 js/ui/altTab.js |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 9d2727e..5de7d7b 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -349,17 +349,13 @@ const AltTabPopup = new Lang.Class({
     _appActivated : function(appSwitcher, n) {
         // If the user clicks on the selected app, activate the
         // selected window; otherwise (eg, they click on an app while
-        // !mouseActive) activate the the clicked-on app.
-        if (n == this._currentApp) {
-            let window;
-            if (this._currentWindow >= 0)
-                window = this._appIcons[this._currentApp].cachedWindows[this._currentWindow];
-            else
-                window = null;
-            this._appIcons[this._currentApp].app.activate_window(window, global.get_current_time());
-        } else {
-            this._appIcons[n].app.activate_window(null, global.get_current_time());
-        }
+        // !mouseActive) activate the clicked-on app.
+        let window;
+        if (n == this._currentApp && this._currentWindow >= 0)
+            window = this._appIcons[n].cachedWindows[this._currentWindow];
+        else
+            window = null;
+        this._appIcons[n].app.activate_window(window, global.get_current_time());
         this.destroy();
     },
 



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