panel: Ensure signal is disconnected when the panel is destroyed
This fixes a warning when terminating GNOME Shell Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3064>
This commit is contained in:
parent
070e712508
commit
b66dee80f6
@ -952,12 +952,13 @@ class Panel extends St.Widget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onMenuSet(indicator) {
|
_onMenuSet(indicator) {
|
||||||
if (!indicator.menu || indicator.menu._openChangedId)
|
if (!indicator.menu || indicator.menu._openChangedConnected)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.menuManager.addMenu(indicator.menu);
|
this.menuManager.addMenu(indicator.menu);
|
||||||
|
|
||||||
indicator.menu._openChangedId = indicator.menu.connect('open-state-changed',
|
indicator.menu._openChangedConnected = true;
|
||||||
|
indicator.menu.connectObject('open-state-changed',
|
||||||
(menu, isOpen) => {
|
(menu, isOpen) => {
|
||||||
let boxAlignment;
|
let boxAlignment;
|
||||||
if (this._leftBox.contains(indicator.container))
|
if (this._leftBox.contains(indicator.container))
|
||||||
@ -969,7 +970,7 @@ class Panel extends St.Widget {
|
|||||||
|
|
||||||
if (boxAlignment === Main.messageTray.bannerAlignment)
|
if (boxAlignment === Main.messageTray.bannerAlignment)
|
||||||
Main.messageTray.bannerBlocked = isOpen;
|
Main.messageTray.bannerBlocked = isOpen;
|
||||||
});
|
}, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
_getDraggableWindowForPosition(stageX) {
|
_getDraggableWindowForPosition(stageX) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user