aboutsummaryrefslogtreecommitdiff
path: root/src/layout/mod.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-02-18 18:56:09 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-02-18 19:06:40 +0300
commitdca187de37164df2584f7388cd0bb6429337a580 (patch)
tree2599407cbd167ce4e643f4ec3cf6ce9c0872ed67 /src/layout/mod.rs
parentfe660a253b445163ff243d7eab842d40937a6bd1 (diff)
downloadniri-dca187de37164df2584f7388cd0bb6429337a580.tar.gz
niri-dca187de37164df2584f7388cd0bb6429337a580.tar.bz2
niri-dca187de37164df2584f7388cd0bb6429337a580.zip
Don't snap after DnD scroll if view position didn't change
Otherwise, any DnD breaks temporarily centered columns.
Diffstat (limited to 'src/layout/mod.rs')
-rw-r--r--src/layout/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index b46f5e3c..dfb0565b 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -1105,7 +1105,7 @@ impl<W: LayoutElement> Layout<W> {
// Unlock the view on the workspaces.
for ws in self.workspaces_mut() {
- ws.view_offset_gesture_end(false, None);
+ ws.dnd_scroll_gesture_end();
}
return Some(RemovedTile {
@@ -3853,7 +3853,7 @@ impl<W: LayoutElement> Layout<W> {
let moved_tile_was_active =
ws.active_window().is_some_and(|win| *win.id() == window_id);
- ws.view_offset_gesture_end(false, None);
+ ws.dnd_scroll_gesture_end();
if moved_tile_was_active {
ws.activate_window(&window_id);
@@ -3876,7 +3876,7 @@ impl<W: LayoutElement> Layout<W> {
// Unlock the view on the workspaces.
if !move_.is_floating {
for ws in self.workspaces_mut() {
- ws.view_offset_gesture_end(false, None);
+ ws.dnd_scroll_gesture_end();
}
}
@@ -4050,7 +4050,7 @@ impl<W: LayoutElement> Layout<W> {
self.dnd = None;
for ws in self.workspaces_mut() {
- ws.view_offset_gesture_end(false, None);
+ ws.dnd_scroll_gesture_end();
}
}
@@ -4459,7 +4459,7 @@ impl<W: LayoutElement> Layout<W> {
if is_scrolling {
ws.dnd_scroll_gesture_begin();
} else {
- ws.view_offset_gesture_end(false, None);
+ ws.dnd_scroll_gesture_end();
}
} else {
// Cancel the view offset gesture after workspace switches, moves, etc.