diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-10-01 07:21:53 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-10-01 06:29:33 +0300 |
| commit | 751345759a0b45f4f6d79cdd1c65a71780cb4a27 (patch) | |
| tree | 08ef9bade6a791fb194cf5dd79daae5dd4be5d3a | |
| parent | 6f8ad18d9ad3e3a0a5973c14468e8c5ca2f4a952 (diff) | |
| download | niri-751345759a0b45f4f6d79cdd1c65a71780cb4a27.tar.gz niri-751345759a0b45f4f6d79cdd1c65a71780cb4a27.tar.bz2 niri-751345759a0b45f4f6d79cdd1c65a71780cb4a27.zip | |
Make find_window_and_output() accept non-mut self
| -rw-r--r-- | src/layout.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout.rs b/src/layout.rs index 38c076b6..6476598e 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -604,10 +604,10 @@ impl<W: LayoutElement> MonitorSet<W> { } } - pub fn find_window_and_output(&mut self, wl_surface: &WlSurface) -> Option<(W, Output)> { + pub fn find_window_and_output(&self, wl_surface: &WlSurface) -> Option<(W, Output)> { if let MonitorSet::Normal { monitors, .. } = self { for mon in monitors { - for ws in &mut mon.workspaces { + for ws in &mon.workspaces { if let Some(window) = ws.find_wl_surface(wl_surface) { return Some((window.clone(), mon.output.clone())); } |
