Skip to content

Commit

Permalink
Make find_window_and_output() accept non-mut self
Browse files Browse the repository at this point in the history
  • Loading branch information
YaLTeR committed Oct 1, 2023
1 parent 6f8ad18 commit 7513457
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
Expand Down

0 comments on commit 7513457

Please sign in to comment.