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.
This commit is contained in:
parent
de7c78accd
commit
7e48191253
1 changed files with 10 additions and 8 deletions
|
|
@ -906,20 +906,22 @@ impl Drop for MoveGrab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} 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
|
None
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
None
|
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::<CursorState>().unwrap();
|
let cursor_state = seat.user_data().get::<CursorState>().unwrap();
|
||||||
cursor_state.lock().unwrap().unset_shape();
|
cursor_state.lock().unwrap().unset_shape();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue