From 9f8f2afead9be7ba757a080bf73dadbc36ce9005 Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Sat, 7 May 2022 21:07:50 +0200 Subject: [PATCH] :beetle: Fix close-animation of windows which were opened before the session was started --- extension.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extension.js b/extension.js index 6577ccf..19609d6 100644 --- a/extension.js +++ b/extension.js @@ -354,7 +354,7 @@ class Extension { // We do nothing if a dialog got closed and we should not burn them. const shouldDestroyDialogs = this._settings.get_boolean('destroy-dialogs'); - // If an effect is to be previewed however, we have to affect dialogs es well. This is + // If an effect is to be previewed, we have to affect dialogs es well. This is // because the preview window is a dialog window... const action = forOpening ? 'open' : 'close'; const previewNick = this._settings.get_string(action + '-preview-effect'); @@ -364,6 +364,14 @@ class Extension { return; } + // There is the weird case where an animation is already ongoing and then a + // window-open animation is requested. This happens when a window is closed which has + // been created before the session was started (e.g. when GNOME Shell has been + // restarted in the meantime). We do nothing in this case. + if (forOpening && actor.get_effect('burn-my-windows-effect')) { + return; + } + // ------------------------------------------------------------------ choose an effect // Now we chose a random effect from all enabled effects.