From 08203c9c1e021da8fb212ae6e1ca1c3704a3e91d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 22 Mar 2020 00:18:13 +0100 Subject: [PATCH] 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 --- js/ui/closeDialog.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/ui/closeDialog.js b/js/ui/closeDialog.js index 01799bd4c..63a0bcfcf 100644 --- a/js/ui/closeDialog.js +++ b/js/ui/closeDialog.js @@ -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();