From 7e48191253ae04ba95f2d7907cc04b3ae81edce0 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Mon, 9 Feb 2026 17:13:07 -0800 Subject: [PATCH] grabs/moving: Call `cleanup_drag()` unconditionally Previously, drag placeholder would be removed in the call to `tiling_layer.drop_window()` when dropping onto a tiling layer, but would not be removed when dropping to a floating layer. Which would leave a placeholder taking up space, and cause a panic on a future drag operation. Instead, call `cleanup_drag()` regardless, after `drop_window()`, to do any cleanup that is still needed. This moves the call that was previously added in 67d0a825. --- src/shell/grabs/moving.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/shell/grabs/moving.rs b/src/shell/grabs/moving.rs index f59f93d6..8b01d086 100644 --- a/src/shell/grabs/moving.rs +++ b/src/shell/grabs/moving.rs @@ -906,20 +906,22 @@ impl Drop for MoveGrab { } } } else { - let mut shell = state.common.shell.write(); - shell - .workspaces - .active_mut(&cursor_output) - .unwrap() - .tiling_layer - .cleanup_drag(); - shell.set_overview_mode(None, state.common.event_loop_handle.clone()); None } } else { None }; + let mut shell = state.common.shell.write(); + shell + .workspaces + .active_mut(&cursor_output) + .unwrap() + .tiling_layer + .cleanup_drag(); + shell.set_overview_mode(None, state.common.event_loop_handle.clone()); + drop(shell); + { let cursor_state = seat.user_data().get::().unwrap(); cursor_state.lock().unwrap().unset_shape();