[gnome-shell] ctrlAltTab: Only add to the focus manager if we have an StWidget.



commit 4728105f43a5d870975fec98498ed2937798c8cd
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Dec 4 14:02:15 2012 -0500

    ctrlAltTab: Only add to the focus manager if we have an StWidget.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=689653

 js/ui/ctrlAltTab.js |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/ctrlAltTab.js b/js/ui/ctrlAltTab.js
index 8e16b5b..215a722 100644
--- a/js/ui/ctrlAltTab.js
+++ b/js/ui/ctrlAltTab.js
@@ -39,13 +39,16 @@ const CtrlAltTabManager = new Lang.Class({
 
         this._items.push(item);
         root.connect('destroy', Lang.bind(this, function() { this.removeGroup(root); }));
-        global.focus_manager.add_group(root);
+        if (root instanceof St.Widget)
+            global.focus_manager.add_group(root);
     },
 
     removeGroup: function(root) {
-        global.focus_manager.remove_group(root);
+        if (root instanceof St.Widget)
+            global.focus_manager.remove_group(root);
         for (let i = 0; i < this._items.length; i++) {
             if (this._items[i].root == root) {
+                let item = this._items[i];
                 this._items.splice(i, 1);
                 return;
             }



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