aboutsummaryrefslogtreecommitdiff
path: root/src/layout/monitor.rs
diff options
context:
space:
mode:
authorFluxTape <fluxtape.contact@gmail.com>2024-02-26 18:47:46 +0100
committerIvan Molodetskikh <yalterz@gmail.com>2024-03-18 19:31:11 +0400
commit741bee461cbdaf0236eaa55dc86dc84b01613128 (patch)
tree13c836833f34f1c53c7148d4d8dfe3f42a99fec5 /src/layout/monitor.rs
parent0c57815fbf47c69af9ed11fa8ebc1b52158a3ba2 (diff)
downloadniri-741bee461cbdaf0236eaa55dc86dc84b01613128.tar.gz
niri-741bee461cbdaf0236eaa55dc86dc84b01613128.tar.bz2
niri-741bee461cbdaf0236eaa55dc86dc84b01613128.zip
Implement warp-mouse-to-focus
Diffstat (limited to 'src/layout/monitor.rs')
-rw-r--r--src/layout/monitor.rs8
1 files changed, 8 insertions, 0 deletions
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<W: LayoutElement> Monitor<W> {
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<Rectangle<i32, Logical>> {
+ // FIXME: switch gesture.
+ self.active_workspace_ref().active_tile_visual_rectangle()
+ }
+
pub fn window_under(
&self,
pos_within_output: Point<f64, Logical>,