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/niri.rs | |
| 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/niri.rs')
| -rw-r--r-- | src/niri.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/niri.rs b/src/niri.rs index f09be356..a0a98c90 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -1222,7 +1222,7 @@ impl Niri { .or_else(|| self.global_space.outputs().next()) } - pub fn output_for_root(&self, root: &WlSurface) -> Option<Output> { + pub fn output_for_root(&self, root: &WlSurface) -> Option<&Output> { // Check the main layout. let win_out = self.layout.find_window_and_output(root); let layout_output = win_out.map(|(_, output)| output); @@ -1233,7 +1233,7 @@ impl Niri { .layer_for_surface(root, WindowSurfaceType::TOPLEVEL) .is_some() }; - let layer_shell_output = || self.layout.outputs().find(has_layer_surface).cloned(); + let layer_shell_output = || self.layout.outputs().find(has_layer_surface); layout_output.or_else(layer_shell_output) } |
