From 2b35c88441d2668f456f9066d5fccb87409ffbc1 Mon Sep 17 00:00:00 2001 From: Leleat Date: Fri, 6 Dec 2024 20:38:38 +0100 Subject: [PATCH] fix: disable animations for tiled windows This is only a workaround for the linked issue below. Currently, retiling a tiled window via the Tiling Popup freezes it. A better way to fix this would be to implement custom animations for tiling (instead of misusing GNOME's existing solution). related: https://github.com/Leleat/Tiling-Assistant/issues/376 --- .../src/extension/tilingWindowManager.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tiling-assistant@leleat-on-github/src/extension/tilingWindowManager.js b/tiling-assistant@leleat-on-github/src/extension/tilingWindowManager.js index 0bc3f57..a3958a5 100644 --- a/tiling-assistant@leleat-on-github/src/extension/tilingWindowManager.js +++ b/tiling-assistant@leleat-on-github/src/extension/tilingWindowManager.js @@ -169,7 +169,9 @@ export class TilingWindowManager { if (!window || window.is_skip_taskbar()) return; + const wasTiled = window.isTiled; const wasMaximized = window.get_maximized(); + if (wasMaximized) window.unmaximize(wasMaximized); @@ -219,7 +221,12 @@ export class TilingWindowManager { // Animations const wActor = window.get_compositor_private(); - if (Settings.getBoolean('enable-tile-animations') && wActor && !skipAnim) { + if ( + Settings.getBoolean('enable-tile-animations') && + wActor && + !wasTiled && + !skipAnim + ) { wActor.remove_all_transitions(); // HACK => journalctl: 'error in size change accounting'...? // TODO: no animation if going from maximized -> tiled and back to back multiple times?