diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-03-17 07:45:26 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-03-17 22:31:19 -0700 |
| commit | e879199880c32e9f5ed9b948edbc0d64c8e67b65 (patch) | |
| tree | 76ecf2abc36f7942baffc0285e47a5cbeaef7728 /src/layout/mod.rs | |
| parent | 5b6b6a5fe111c3b55ba1f8976ec7a3daac3fc04c (diff) | |
| download | niri-e879199880c32e9f5ed9b948edbc0d64c8e67b65.tar.gz niri-e879199880c32e9f5ed9b948edbc0d64c8e67b65.tar.bz2 niri-e879199880c32e9f5ed9b948edbc0d64c8e67b65.zip | |
layout: Switch two places to workspaces_mut()
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 44 |
1 files changed, 8 insertions, 36 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 67963f2e..432a1d41 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -3457,24 +3457,10 @@ impl<W: LayoutElement> Layout<W> { } } - match &mut self.monitor_set { - MonitorSet::Normal { monitors, .. } => { - for mon in monitors { - for ws in &mut mon.workspaces { - if ws.has_window(window) { - ws.set_fullscreen(window, is_fullscreen); - return; - } - } - } - } - MonitorSet::NoOutputs { workspaces, .. } => { - for ws in workspaces { - if ws.has_window(window) { - ws.set_fullscreen(window, is_fullscreen); - return; - } - } + for ws in self.workspaces_mut() { + if ws.has_window(window) { + ws.set_fullscreen(window, is_fullscreen); + return; } } } @@ -3486,24 +3472,10 @@ impl<W: LayoutElement> Layout<W> { } } - match &mut self.monitor_set { - MonitorSet::Normal { monitors, .. } => { - for mon in monitors { - for ws in &mut mon.workspaces { - if ws.has_window(window) { - ws.toggle_fullscreen(window); - return; - } - } - } - } - MonitorSet::NoOutputs { workspaces, .. } => { - for ws in workspaces { - if ws.has_window(window) { - ws.toggle_fullscreen(window); - return; - } - } + for ws in self.workspaces_mut() { + if ws.has_window(window) { + ws.toggle_fullscreen(window); + return; } } } |
