From 741bee461cbdaf0236eaa55dc86dc84b01613128 Mon Sep 17 00:00:00 2001 From: FluxTape Date: Mon, 26 Feb 2024 18:47:46 +0100 Subject: Implement warp-mouse-to-focus --- src/layout/monitor.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/layout/monitor.rs') diff --git a/src/layout/monitor.rs b/src/layout/monitor.rs index f817ef1a..e9fb2271 100644 --- a/src/layout/monitor.rs +++ b/src/layout/monitor.rs @@ -583,6 +583,14 @@ impl Monitor { self.clean_up_workspaces(); } + /// Returns the geometry of the active tile relative to and clamped to the output. + /// + /// During animations, assumes the final view position. + pub fn active_tile_visual_rectangle(&self) -> Option> { + // FIXME: switch gesture. + self.active_workspace_ref().active_tile_visual_rectangle() + } + pub fn window_under( &self, pos_within_output: Point, -- cgit