diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-24 17:38:13 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-24 17:38:13 +0400 |
| commit | be2e551a89abb98099f094f73889d6d0cc46c87c (patch) | |
| tree | 28e13fb690fc207fa46361b0670df52181552042 /src/layout | |
| parent | ed3080d908001bf468789b8f47f893e00306135d (diff) | |
| download | niri-be2e551a89abb98099f094f73889d6d0cc46c87c.tar.gz niri-be2e551a89abb98099f094f73889d6d0cc46c87c.tar.bz2 niri-be2e551a89abb98099f094f73889d6d0cc46c87c.zip | |
Move clones up from find_window_and_output
Diffstat (limited to 'src/layout')
| -rw-r--r-- | src/layout/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 5d747cfe..5ccbebd1 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -477,12 +477,12 @@ impl<W: LayoutElement> Layout<W> { } } - pub fn find_window_and_output(&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.monitor_set { for mon in monitors { for ws in &mon.workspaces { if let Some(window) = ws.find_wl_surface(wl_surface) { - return Some((window.clone(), mon.output.clone())); + return Some((window, &mon.output)); } } } |
