From 4728105f43a5d870975fec98498ed2937798c8cd Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 4 Dec 2012 14:02:15 -0500 Subject: [PATCH] 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 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/ui/ctrlAltTab.js b/js/ui/ctrlAltTab.js index 8e16b5b7c..215a72271 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; }