keyboard: Remove needless function

It boils down to another function call, and has a single caller. Just let
the caller make _setActiveLayer() directly.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/46
This commit is contained in:
Carlos Garnacho 2018-02-14 12:46:48 +01:00
parent 0608413b96
commit f8abe073eb

View File

@ -813,7 +813,7 @@ var Keyboard = new Lang.Class({
})); }));
extraButton.connect('released', Lang.bind(this, function() { extraButton.connect('released', Lang.bind(this, function() {
if (switchToLevel != null) if (switchToLevel != null)
this._onLevelChanged(switchToLevel); this._setActiveLayer(switchToLevel);
else if (keyval != null) else if (keyval != null)
this._keyboardController.keyvalRelease(keyval); this._keyboardController.keyvalRelease(keyval);
else if (action == 'hide') else if (action == 'hide')
@ -902,10 +902,6 @@ var Keyboard = new Lang.Class({
this.actor.height = maxHeight; this.actor.height = maxHeight;
}, },
_onLevelChanged: function (level) {
this._setActiveLayer(level);
},
_onGroupChanged: function () { _onGroupChanged: function () {
this._ensureKeysForGroup(this._keyboardController.getCurrentGroup()); this._ensureKeysForGroup(this._keyboardController.getCurrentGroup());
this._setActiveLayer(0); this._setActiveLayer(0);