[gnome-shell-extensions] alternate-tab: destroy the object if there is no window



commit afa8ccd07fde8fa1581ec45551ad67d192c3c912
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Fri Nov 18 18:51:59 2011 +0100

    alternate-tab: destroy the object if there is no window
    
    We cannot return from show() without creating an AppSwitcher, as it
    will subsequently crash in core shell code due to _appSwitcher being null.
    We can prevent this by destroying the actor (which will prevent it
    from being allocated and thus avoid the crash).

 extensions/alternate-tab/extension.js |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/extensions/alternate-tab/extension.js b/extensions/alternate-tab/extension.js
index 6956ce2..68b27e9 100644
--- a/extensions/alternate-tab/extension.js
+++ b/extensions/alternate-tab/extension.js
@@ -403,8 +403,10 @@ AltTabPopup2.prototype = {
             }
 	}
 
-        if (!windows.length)
+        if (!windows.length) {
+            this.destroy();
             return false;
+        }
 
         if (!Main.pushModal(this.actor)) {
             // Probably someone else has a pointer grab, try again with keyboard only



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