From 0cd8484bdce68fa3eae493dcb220abeb440ab5cd Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Thu, 30 Oct 2025 08:35:19 +0300 Subject: Unify pointer & touch move grab, add view offset to it --- src/layout/mod.rs | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'src/layout') 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 Layout { 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 Layout { } } - // 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_, -- cgit