layout: Extract Monitor::update_shaders()

This commit is contained in:
Ivan Molodetskikh
2025-04-17 10:40:48 +03:00
parent fdbc485d78
commit 7884d3bfea
2 changed files with 7 additions and 3 deletions
+1 -3
View File
@@ -2731,9 +2731,7 @@ impl<W: LayoutElement> Layout<W> {
match &mut self.monitor_set {
MonitorSet::Normal { monitors, .. } => {
for mon in monitors {
for ws in &mut mon.workspaces {
ws.update_shaders();
}
mon.update_shaders();
}
}
MonitorSet::NoOutputs { workspaces, .. } => {
+6
View File
@@ -713,6 +713,12 @@ impl<W: LayoutElement> Monitor<W> {
self.options = options;
}
pub fn update_shaders(&mut self) {
for ws in &mut self.workspaces {
ws.update_shaders();
}
}
pub fn move_workspace_down(&mut self) {
let mut new_idx = min(self.active_workspace_idx + 1, self.workspaces.len() - 1);
if new_idx == self.active_workspace_idx {