diff options
| -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; } } } |
