aboutsummaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-10-30 08:35:19 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-11-21 09:15:18 +0300
commit0cd8484bdce68fa3eae493dcb220abeb440ab5cd (patch)
tree4653f9ce21015efdde7cc9ddce7e2d239964c72f /src/layout
parent9d522ed51e75d1253793f9f5ec42b8faf36e47e7 (diff)
downloadniri-0cd8484bdce68fa3eae493dcb220abeb440ab5cd.tar.gz
niri-0cd8484bdce68fa3eae493dcb220abeb440ab5cd.tar.bz2
niri-0cd8484bdce68fa3eae493dcb220abeb440ab5cd.zip
Unify pointer & touch move grab, add view offset to it
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/mod.rs30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index 8761c0e3..9fd99a32 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -4040,16 +4040,12 @@ impl<W: LayoutElement> Layout<W> {
mon.dnd_scroll_gesture_end();
}
- let mut ws_id = None;
for ws in self.workspaces_mut() {
- let id = ws.id();
if let Some(tile) = ws.tiles_mut().find(|tile| *tile.window().id() == window_id)
{
let offset = tile.interactive_move_offset;
tile.interactive_move_offset = Point::from((0., 0.));
tile.animate_move_from(offset);
-
- ws_id = Some(id);
}
// Unlock the view on the workspaces, but if the moved window was active,
@@ -4064,32 +4060,6 @@ impl<W: LayoutElement> Layout<W> {
}
}
- // In the overview, we want to click on a window to focus it, and also to
- // click-and-drag to move the window. The way we handle this is by always starting
- // the interactive move (to get frozen view), then, when in the overview, *not*
- // calling interactive_move_update() until the cursor moves far enough. This means
- // that if we "just click" then we end up in this branch with state == Starting.
- // Close the overview in this case.
- if self.overview_open {
- let ws_id = ws_id.unwrap();
- if let MonitorSet::Normal { monitors, .. } = &mut self.monitor_set {
- for mon in monitors {
- if let Some(ws_idx) =
- mon.workspaces.iter().position(|ws| ws.id() == ws_id)
- {
- mon.activate_workspace_with_anim_config(
- ws_idx,
- Some(self.options.animations.overview_open_close.0),
- );
- break;
- }
- }
- }
-
- self.activate_window(&window_id);
- self.close_overview();
- }
-
return;
}
InteractiveMoveState::Moving(move_) => move_,