mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-24 02:01:18 +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 {
|
match &mut self.monitor_set {
|
||||||
MonitorSet::Normal { monitors, .. } => {
|
MonitorSet::Normal { monitors, .. } => {
|
||||||
for mon in monitors {
|
for mon in monitors {
|
||||||
for ws in &mut mon.workspaces {
|
mon.update_shaders();
|
||||||
ws.update_shaders();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MonitorSet::NoOutputs { workspaces, .. } => {
|
MonitorSet::NoOutputs { workspaces, .. } => {
|
||||||
|
|||||||
@@ -713,6 +713,12 @@ impl<W: LayoutElement> Monitor<W> {
|
|||||||
self.options = options;
|
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) {
|
pub fn move_workspace_down(&mut self) {
|
||||||
let mut new_idx = min(self.active_workspace_idx + 1, self.workspaces.len() - 1);
|
let mut new_idx = min(self.active_workspace_idx + 1, self.workspaces.len() - 1);
|
||||||
if new_idx == self.active_workspace_idx {
|
if new_idx == self.active_workspace_idx {
|
||||||
|
|||||||
Reference in New Issue
Block a user