panel: Ensure already destroyed panels don't receive callbacks
To prevent sporadic shutdown failures: ``` ** Message: 17:08:37.707: Shutting down GNOME Shell (gnome-shell:91892): Gjs-CRITICAL **: 17:08:37.728: Object .Gjs_ui_panel_Panel (0x5b53524fb030), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs. ``` Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3601>
This commit is contained in:
parent
43e39b9d02
commit
dee6cf3f6b
@ -678,9 +678,13 @@ class Panel extends St.Widget {
|
|||||||
_('Top Bar'), 'shell-focus-top-bar-symbolic',
|
_('Top Bar'), 'shell-focus-top-bar-symbolic',
|
||||||
{sortGroup: CtrlAltTab.SortGroup.TOP});
|
{sortGroup: CtrlAltTab.SortGroup.TOP});
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', this._updatePanel.bind(this));
|
Main.sessionMode.connectObject('updated',
|
||||||
|
this._updatePanel.bind(this),
|
||||||
|
this);
|
||||||
|
|
||||||
global.display.connect('workareas-changed', () => this.queue_relayout());
|
global.display.connectObject('workareas-changed',
|
||||||
|
() => this.queue_relayout(),
|
||||||
|
this);
|
||||||
this._updatePanel();
|
this._updatePanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user