forge
Explore
Log in

Don't you dare go Hollow

layout: Switch two places to workspaces_mut()

Browse files at this commit

e879199880c32e9f5ed9b948edbc0d64c8e67b65Ivan MolodetskikhParent: 5b6b6a5
src/layout/mod.rsmodified+8 -36
@@ -3457,24 +3457,10 @@ impl<W: LayoutElement> Layout<W> {
34573457 }
34583458 }
34593459
3460- match &mut self.monitor_set {
3461- MonitorSet::Normal { monitors, .. } => {
3462- for mon in monitors {
3463- for ws in &mut mon.workspaces {
3464- if ws.has_window(window) {
3465- ws.set_fullscreen(window, is_fullscreen);
3466- return;
3467- }
3468- }
3469- }
3470- }
3471- MonitorSet::NoOutputs { workspaces, .. } => {
3472- for ws in workspaces {
3473- if ws.has_window(window) {
3474- ws.set_fullscreen(window, is_fullscreen);
3475- return;
3476- }
3477- }
3460+ for ws in self.workspaces_mut() {
3461+ if ws.has_window(window) {
3462+ ws.set_fullscreen(window, is_fullscreen);
3463+ return;
34783464 }
34793465 }
34803466 }
@@ -3486,24 +3472,10 @@ impl<W: LayoutElement> Layout<W> {
34863472 }
34873473 }
34883474
3489- match &mut self.monitor_set {
3490- MonitorSet::Normal { monitors, .. } => {
3491- for mon in monitors {
3492- for ws in &mut mon.workspaces {
3493- if ws.has_window(window) {
3494- ws.toggle_fullscreen(window);
3495- return;
3496- }
3497- }
3498- }
3499- }
3500- MonitorSet::NoOutputs { workspaces, .. } => {
3501- for ws in workspaces {
3502- if ws.has_window(window) {
3503- ws.toggle_fullscreen(window);
3504- return;
3505- }
3506- }
3475+ for ws in self.workspaces_mut() {
3476+ if ws.has_window(window) {
3477+ ws.toggle_fullscreen(window);
3478+ return;
35073479 }
35083480 }
35093481 }