From 294a3b8cdbe09a9cac54d1a48a40a5972a372cda Mon Sep 17 00:00:00 2001 From: Leonhard Kargl Date: Sat, 7 Dec 2024 15:09:01 +0100 Subject: [PATCH] Fix cancelling workspace switch gesture --- src/WindowManager.vala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/WindowManager.vala b/src/WindowManager.vala index 37d69c639..06c111923 100644 --- a/src/WindowManager.vala +++ b/src/WindowManager.vala @@ -2199,7 +2199,6 @@ namespace Gala { if (!animating_switch_workspace) { return; } - animating_switch_workspace = cancel_action; if (switch_workspace_window_created_id > 0) { disconnect (switch_workspace_window_created_id); @@ -2210,6 +2209,8 @@ namespace Gala { switch_workspace_completed (); } + animating_switch_workspace = cancel_action; + if (cancel_action) { var cancel_direction = (animation_direction == Meta.MotionDirection.LEFT) ? Meta.MotionDirection.RIGHT @@ -2291,8 +2292,7 @@ namespace Gala { } public override void kill_switch_workspace () { - // We don't care about animation direction, we don't want to cancel it, make it nudge so that it doesn't call switch_workspace_completed () - switch_workspace_animation_finished (LEFT, false, true); + end_switch_workspace (); } public override void locate_pointer () {