mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
layout: Switch two places to workspaces_mut()
This commit is contained in:
+8
-36
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user