diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-24 17:40:30 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-24 17:40:30 +0400 |
| commit | 85cb4b42f6f0f1b445957381f8ec65571ece2ad5 (patch) | |
| tree | f68e97bd89864df6a9cb853a41c4148f33dfd2fa /src/layout | |
| parent | be2e551a89abb98099f094f73889d6d0cc46c87c (diff) | |
| download | niri-85cb4b42f6f0f1b445957381f8ec65571ece2ad5.tar.gz niri-85cb4b42f6f0f1b445957381f8ec65571ece2ad5.tar.bz2 niri-85cb4b42f6f0f1b445957381f8ec65571ece2ad5.zip | |
Remove clones from active_window
Diffstat (limited to 'src/layout')
| -rw-r--r-- | src/layout/mod.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 5ccbebd1..9e8cbe53 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -608,7 +608,7 @@ impl<W: LayoutElement> Layout<W> { Some(&mon.workspaces[mon.active_workspace_idx]) } - pub fn active_window(&self) -> Option<(W, Output)> { + pub fn active_window(&self) -> Option<(&W, &Output)> { let MonitorSet::Normal { monitors, active_monitor_idx, @@ -626,10 +626,7 @@ impl<W: LayoutElement> Layout<W> { } let col = &ws.columns[ws.active_column_idx]; - Some(( - col.windows[col.active_window_idx].clone(), - mon.output.clone(), - )) + Some((&col.windows[col.active_window_idx], &mon.output)) } pub fn windows_for_output(&self, output: &Output) -> impl Iterator<Item = &W> + '_ { |
