[gnome-shell] keyboard: destroy actors when a group is removed



commit a8f9871725d4bdc5fa0f07a142d217a9eec13d8d
Author: Daiki Ueno <ueno unixuser org>
Date:   Wed Feb 20 19:10:29 2013 +0900

    keyboard: destroy actors when a group is removed
    
    We can't reuse key actors since signals connected to them are
    associated to the original group object.
    Fix of commit 824fbe09c2a4f59b009a3dd57d40ec752c2efc89.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681735

 js/ui/keyboard.js |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 615ba7b..3201249 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -412,13 +412,11 @@ const Keyboard = new Lang.Class({
     },
 
     _onGroupAdded: function (keyboard, gname) {
-        if (!(gname in this._groups))
-            this._groups[gname] = this._createLayersForGroup(gname);
+        this._groups[gname] = this._createLayersForGroup(gname);
     },
 
     _onGroupRemoved: function (keyboard, gname) {
-        // Since _createLayersForGroup is costly, don't remove the
-        // actors from _groups, so they can be reused.
+        delete this._groups[gname];
     },
 
     _setActiveLayer: function () {


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