Make find_window_and_output() accept non-mut self
Browse files at this commit751345759a0b45f4f6d79cdd1c65a71780cb4a27Parent: 6f8ad181 changed file +2 -2
- src/layout.rs +2 -2
src/layout.rsmodified+2 -2
| @@ -604,10 +604,10 @@ impl<W: LayoutElement> MonitorSet<W> { | ||
| 604 | 604 | } |
| 605 | 605 | } |
| 606 | 606 | |
| 607 | - pub fn find_window_and_output(&mut self, wl_surface: &WlSurface) -> Option<(W, Output)> { | |
| 607 | + pub fn find_window_and_output(&self, wl_surface: &WlSurface) -> Option<(W, Output)> { | |
| 608 | 608 | if let MonitorSet::Normal { monitors, .. } = self { |
| 609 | 609 | for mon in monitors { |
| 610 | - for ws in &mut mon.workspaces { | |
| 610 | + for ws in &mon.workspaces { | |
| 611 | 611 | if let Some(window) = ws.find_wl_surface(wl_surface) { |
| 612 | 612 | return Some((window.clone(), mon.output.clone())); |
| 613 | 613 | } |