mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
layout: Extract Monitor::update_shaders()
This commit is contained in:
+1
-3
@@ -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, .. } => {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user