From 38d12453b6c8d31ce4bd9d9245301577cb53575f Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Wed, 5 Apr 2023 08:02:44 +0200 Subject: [PATCH] :beetle: Prevent a warning --- extension.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/extension.js b/extension.js index bc100c2..c094128 100644 --- a/extension.js +++ b/extension.js @@ -575,8 +575,12 @@ class Extension { actor._bmwOverviewCloneContainer.scale_y = 1.0; } - // Once the animation is done or interrupted, we call the methods which should have - // been called by the original ease() methods. + // Remove the shader and mark it being re-usable for future animations. + actor.remove_effect(shader); + shader.returnToFactory(); + + // Finally, once the animation is done or interrupted, we call the methods which + // should have been called by the original ease() methods. // https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/windowManager.js#L1487 // https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/windowManager.js#L1558. if (forOpening) { @@ -584,14 +588,8 @@ class Extension { } else { Main.wm._destroyWindowDone(global.window_manager, actor); } - - // Finally remove the shader and mark it being re-usable for future animations. - actor.remove_effect(shader); - shader.returnToFactory(); }); - - // To make things deterministic during testing, we set the effect duration to 5 // seconds. const duration =