diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-28 08:45:12 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-28 08:45:12 +0400 |
| commit | b13892ca637cccfb496e3204b2793c069af17ccb (patch) | |
| tree | 751ba2381c595baae1296eb8cbd5889418541b10 /src/layout/monitor.rs | |
| parent | 777ad4ee5c8cf84b2bfa13c6bdb0d254c24881f9 (diff) | |
| download | niri-b13892ca637cccfb496e3204b2793c069af17ccb.tar.gz niri-b13892ca637cccfb496e3204b2793c069af17ccb.tar.bz2 niri-b13892ca637cccfb496e3204b2793c069af17ccb.zip | |
Activate windows when clicking on the border
Diffstat (limited to 'src/layout/monitor.rs')
| -rw-r--r-- | src/layout/monitor.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<W: LayoutElement> Monitor<W> { pub fn window_under( &self, pos_within_output: Point<f64, Logical>, - ) -> Option<(&W, Point<i32, Logical>)> { + ) -> Option<(&W, Option<Point<i32, Logical>>)> { match &self.workspace_switch { Some(switch) => { let size = output_size(&self.output); @@ -469,7 +469,7 @@ impl<W: LayoutElement> Monitor<W> { 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]; |
