[gnome-shell] Don't remove the tray icons we don't add



commit 08f7ecad359c80839ac060f0e67ccb12a75816c3
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu Oct 28 22:25:33 2010 +0200

    Don't remove the tray icons we don't add
    
    Tray icons replaced by a shell version are automatically filtered
    and never make to the tray container, but when removed by the client
    we were still trying to remove them from the tray, causing a warning.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=633028

 js/ui/panel.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index da1079c..eb1e4a3 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -903,7 +903,8 @@ Panel.prototype = {
     },
 
     _onTrayIconRemoved: function(o, icon) {
-        this._trayBox.remove_actor(icon);
+        if (icon.get_parent() != null)
+            this._trayBox.remove_actor(icon);
     },
 
     _addRipple : function(delay, time, startScale, startOpacity, finalScale, finalOpacity) {



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