[gnome-shell] ctrlAltTab: Remove some dead code for a "window" parameter



commit 1f46a0dc26d8156774020affa4cc6c9e4e4933f0
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Dec 4 13:48:08 2012 -0500

    ctrlAltTab: Remove some dead code for a "window" parameter
    
    This isn't set on any item, so we can safely remove it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=689653

 js/ui/ctrlAltTab.js |   22 +++++-----------------
 1 files changed, 5 insertions(+), 17 deletions(-)
---
diff --git a/js/ui/ctrlAltTab.js b/js/ui/ctrlAltTab.js
index 7ed1e4d..8e16b5b 100644
--- a/js/ui/ctrlAltTab.js
+++ b/js/ui/ctrlAltTab.js
@@ -53,9 +53,7 @@ const CtrlAltTabManager = new Lang.Class({
     },
 
     focusGroup: function(item, timestamp) {
-        if (item.window) {
-            Main.activateWindow(item.window, timestamp);
-        } else if (item.focusCallback) {
+        if (item.focusCallback) {
             item.focusCallback(timestamp);
         } else {
             if (global.stage_input_mode == Shell.StageInputMode.NONREACTIVE ||
@@ -74,21 +72,11 @@ const CtrlAltTabManager = new Lang.Class({
         if (a.sortGroup != b.sortGroup)
             return a.sortGroup - b.sortGroup;
 
-        let y;
-        if (a.x == undefined) {
-            if (a.window)
-                a.x = a.window.get_compositor_private().x;
-            else
-                [a.x, y] = a.proxy.get_transformed_position();
-        }
-        if (b.x == undefined) {
-            if (b.window)
-                b.x = b.window.get_compositor_private().x;
-            else
-                [b.x, y] = b.proxy.get_transformed_position();
-        }
+        let ax, bx, y;
+        [ax, y] = a.proxy.get_transformed_position();
+        [bx, y] = b.proxy.get_transformed_position();
 
-        return a.x - b.x;
+        return ax - bx;
     },
 
     popup: function(backward, binding, mask) {



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