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> {
3457 }3457 }
3458 }3458 }
3459 3459
3460- match &mut self.monitor_set {3460+ for ws in self.workspaces_mut() {
3461- MonitorSet::Normal { monitors, .. } => {3461+ if ws.has_window(window) {
3462- for mon in monitors {3462+ ws.set_fullscreen(window, is_fullscreen);
3463- for ws in &mut mon.workspaces {3463+ return;
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- }
3478 }3464 }
3479 }3465 }
3480 }3466 }
@@ -3486,24 +3472,10 @@ impl<W: LayoutElement> Layout<W> {
3486 }3472 }
3487 }3473 }
3488 3474
3489- match &mut self.monitor_set {3475+ for ws in self.workspaces_mut() {
3490- MonitorSet::Normal { monitors, .. } => {3476+ if ws.has_window(window) {
3491- for mon in monitors {3477+ ws.toggle_fullscreen(window);
3492- for ws in &mut mon.workspaces {3478+ return;
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- }
3507 }3479 }
3508 }3480 }
3509 }3481 }