closeDialog: Remove transitions before resetting dialog

On X11, _onFocusChanged() updates the input region, as well as the
reactive-ness of the dialog's buttons.

That method is not only used as signal handlers (which are correctly
disconnected when the dialog is hidden), it also runs when the "show"
transition completes.

That's a problem if the transition is still ongoing when the dialog is
hidden, as it will then only complete when it is replaced by the "hide"
transition, after the this._dialog has been reset to null, and trying
to access the dialog's buttons results in an error.

Avoid this by explicitly removing all transition on hide before
resetting the dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2467
This commit is contained in:
Florian Müllner 2020-03-22 00:18:13 +01:00 committed by Georges Basile Stavracas Neto
parent d29e5765ba
commit 08203c9c1e

View File

@ -188,6 +188,8 @@ var CloseDialog = GObject.registerClass({
global.stage.disconnect(this._keyFocusChangedId);
this._keyFocusChangedId = 0;
this._dialog._dialog.remove_all_transitions();
let dialog = this._dialog;
this._dialog = null;
this._removeWindowEffect();