layout: Extract Monitor::update_shaders()
Browse files at this commit7884d3bfea810740fe2ca7021b102af0f049ccaeParent: fdbc4852 changed files +7 -3
- src/layout/mod.rs +1 -3
- src/layout/monitor.rs +6 -0
src/layout/mod.rsmodified+1 -3
| @@ -2731,9 +2731,7 @@ impl<W: LayoutElement> Layout<W> { | ||
| 2731 | 2731 | match &mut self.monitor_set { |
| 2732 | 2732 | MonitorSet::Normal { monitors, .. } => { |
| 2733 | 2733 | for mon in monitors { |
| 2734 | - for ws in &mut mon.workspaces { | |
| 2735 | - ws.update_shaders(); | |
| 2736 | - } | |
| 2734 | + mon.update_shaders(); | |
| 2737 | 2735 | } |
| 2738 | 2736 | } |
| 2739 | 2737 | MonitorSet::NoOutputs { workspaces, .. } => { |
src/layout/monitor.rsmodified+6 -0
| @@ -713,6 +713,12 @@ impl<W: LayoutElement> Monitor<W> { | ||
| 713 | 713 | self.options = options; |
| 714 | 714 | } |
| 715 | 715 | |
| 716 | + pub fn update_shaders(&mut self) { | |
| 717 | + for ws in &mut self.workspaces { | |
| 718 | + ws.update_shaders(); | |
| 719 | + } | |
| 720 | + } | |
| 721 | + | |
| 716 | 722 | pub fn move_workspace_down(&mut self) { |
| 717 | 723 | let mut new_idx = min(self.active_workspace_idx + 1, self.workspaces.len() - 1); |
| 718 | 724 | if new_idx == self.active_workspace_idx { |