popupMenu: Make destroy() a bit more robust
Currently destroying a menu's actor and calling its destroy() method are subtly different - the latter will also result in the menu being removed from the corresponding menu manager. There is no good justification for that behavior, so make both actions behave the same. https://bugzilla.gnome.org/show_bug.cgi?id=724690
This commit is contained in:
parent
b7e1539699
commit
3e7e88cd5f
@ -111,6 +111,7 @@ const PopupBaseMenuItem = new Lang.Class({
|
||||
|
||||
this.actor.connect('key-focus-in', Lang.bind(this, this._onKeyFocusIn));
|
||||
this.actor.connect('key-focus-out', Lang.bind(this, this._onKeyFocusOut));
|
||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
||||
},
|
||||
|
||||
_getTopMenu: function() {
|
||||
@ -192,6 +193,9 @@ const PopupBaseMenuItem = new Lang.Class({
|
||||
|
||||
destroy: function() {
|
||||
this.actor.destroy();
|
||||
},
|
||||
|
||||
_onDestroy: function() {
|
||||
this.emit('destroy');
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user