From b13892ca637cccfb496e3204b2793c069af17ccb Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Thu, 28 Dec 2023 08:45:12 +0400 Subject: Activate windows when clicking on the border --- src/layout/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/layout/mod.rs') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 484a377a..1a9b5076 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -920,11 +920,18 @@ impl Layout { monitors[*active_monitor_idx].focus() } + /// Returns the window under the cursor and the position of its toplevel surface within the + /// output. + /// + /// `Some((w, Some(p)))` means that the cursor is within the window's input region and can be + /// used for delivering events to the window. `Some((w, None))` means that the cursor is within + /// the window's activation region, but not within the window's input region. For example, the + /// cursor may be on the window's server-side border. pub fn window_under( &self, output: &Output, pos_within_output: Point, - ) -> Option<(&W, Point)> { + ) -> Option<(&W, Option>)> { let MonitorSet::Normal { monitors, .. } = &self.monitor_set else { return None; }; -- cgit