mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
layout: End DnD gesture when toggling interactive move to floating
Effective behavior mostly unchanged (it would end on refresh()), but this was failing the invariant checks.
This commit is contained in:
@@ -3358,6 +3358,11 @@ impl<W: LayoutElement> Layout<W> {
|
||||
1.,
|
||||
self.options.animations.window_movement.0,
|
||||
);
|
||||
|
||||
// Unlock the view on the workspaces.
|
||||
for ws in self.workspaces_mut() {
|
||||
ws.dnd_scroll_gesture_end();
|
||||
}
|
||||
} else {
|
||||
// Animate the tile back to semitransparent.
|
||||
move_.tile.animate_alpha(
|
||||
|
||||
@@ -2970,6 +2970,35 @@ fn add_window_next_to_only_interactively_moved_without_outputs() {
|
||||
check_ops(&ops);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn interactive_move_toggle_floating_ends_dnd_gesture() {
|
||||
let ops = [
|
||||
Op::AddOutput(1),
|
||||
Op::AddWindow {
|
||||
params: TestWindowParams::new(2),
|
||||
},
|
||||
Op::InteractiveMoveBegin {
|
||||
window: 2,
|
||||
output_idx: 1,
|
||||
px: 0.0,
|
||||
py: 0.0,
|
||||
},
|
||||
Op::InteractiveMoveUpdate {
|
||||
window: 2,
|
||||
dx: 0.0,
|
||||
dy: 3586.692842955048,
|
||||
output_idx: 1,
|
||||
px: 0.0,
|
||||
py: 0.0,
|
||||
},
|
||||
Op::Refresh { is_active: false },
|
||||
Op::ToggleWindowFloating { id: None },
|
||||
Op::InteractiveMoveEnd { window: 2 },
|
||||
];
|
||||
|
||||
check_ops(&ops);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn set_width_fixed_negative() {
|
||||
let ops = [
|
||||
|
||||
Reference in New Issue
Block a user