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/monitor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/layout/monitor.rs') diff --git a/src/layout/monitor.rs b/src/layout/monitor.rs index aefbf29f..aa4c439e 100644 --- a/src/layout/monitor.rs +++ b/src/layout/monitor.rs @@ -450,7 +450,7 @@ impl Monitor { pub fn window_under( &self, pos_within_output: Point, - ) -> Option<(&W, Point)> { + ) -> Option<(&W, Option>)> { match &self.workspace_switch { Some(switch) => { let size = output_size(&self.output); @@ -469,7 +469,7 @@ impl Monitor { let ws = &self.workspaces[idx]; let (win, win_pos) = ws.window_under(pos_within_output + ws_offset.to_f64())?; - Some((win, win_pos - ws_offset)) + Some((win, win_pos.map(|p| p - ws_offset))) } None => { let ws = &self.workspaces[self.active_workspace_idx]; -- cgit