From 6ed73a27c7ee89c44bb7448b54585f82654244fb Mon Sep 17 00:00:00 2001 From: Leonhard Kargl Date: Sun, 5 Jan 2025 23:49:13 +0100 Subject: [PATCH] WindowManager: Fix cancelling window move gesture --- src/WindowManager.vala | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/WindowManager.vala b/src/WindowManager.vala index 9d6376381..8c93583a4 100644 --- a/src/WindowManager.vala +++ b/src/WindowManager.vala @@ -2145,7 +2145,14 @@ namespace Gala { unowned Meta.Display display = get_display (); unowned var active_workspace = display.get_workspace_manager ().get_active_workspace (); unowned var neighbor = active_workspace.get_neighbor (cancel_direction); - neighbor.activate (display.get_current_time ()); + + if (moving != null) { + move_window (moving, neighbor, Meta.CURRENT_TIME); + } else { + neighbor.activate (display.get_current_time ()); + } + } else { + moving = null; } } @@ -2207,7 +2214,6 @@ namespace Gala { windows = null; parents = null; - moving = null; out_group = null; in_group = null;