closeDialog: Close existing dialogs on shutdown

Otherwise mutter will request to hide the dialog when the meta
context is destroyed, but at the JS context has already shut down,
resulting in a crash.

Close https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7328

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3117>
This commit is contained in:
Florian Müllner 2024-01-15 14:39:59 +01:00 committed by Marge Bot
parent 655eb672d6
commit 17b7162121

View File

@ -166,6 +166,9 @@ export const CloseDialog = GObject.registerClass({
this._addWindowEffect();
this._initDialog();
global.connectObject(
'shutdown', () => this._onWait(), this._dialog);
this._dialog._dialog.scale_y = 0;
this._dialog._dialog.set_pivot_point(0.5, 0.5);