forge
Explore
Log in

Don't you dare go Hollow

Make find_window_and_output() accept non-mut self

Browse files at this commit

751345759a0b45f4f6d79cdd1c65a71780cb4a27Ivan MolodetskikhParent: 6f8ad18
src/layout.rsmodified+2 -2
@@ -604,10 +604,10 @@ impl<W: LayoutElement> MonitorSet<W> {
604604 }
605605 }
606606
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)> {
608608 if let MonitorSet::Normal { monitors, .. } = self {
609609 for mon in monitors {
610- for ws in &mut mon.workspaces {
610+ for ws in &mon.workspaces {
611611 if let Some(window) = ws.find_wl_surface(wl_surface) {
612612 return Some((window.clone(), mon.output.clone()));
613613 }