diff options
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 9fbd1623..9376112f 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -1800,7 +1800,7 @@ impl<W: LayoutElement> Layout<W> { } } - pub fn update_render_elements(&mut self, output: &Output) { + pub fn update_render_elements(&mut self, output: Option<&Output>) { let _span = tracy_client::span!("Layout::update_render_elements"); let MonitorSet::Normal { @@ -1814,31 +1814,12 @@ impl<W: LayoutElement> Layout<W> { }; for (idx, mon) in monitors.iter_mut().enumerate() { - if mon.output == *output { + if output.map_or(true, |output| mon.output == *output) { mon.update_render_elements(idx == *active_monitor_idx); - return; } } } - pub fn update_render_elements_all(&mut self) { - let _span = tracy_client::span!("Layout::update_render_elements_all"); - - let MonitorSet::Normal { - monitors, - active_monitor_idx, - .. - } = &mut self.monitor_set - else { - error!("update_render_elements_all called with no monitors"); - return; - }; - - for (idx, mon) in monitors.iter_mut().enumerate() { - mon.update_render_elements(idx == *active_monitor_idx); - } - } - pub fn update_shaders(&mut self) { match &mut self.monitor_set { MonitorSet::Normal { monitors, .. } => { |
