aboutsummaryrefslogtreecommitdiff
path: root/src/layout/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/mod.rs')
-rw-r--r--src/layout/mod.rs33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index b670b9f5..b93dfb4d 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -1354,23 +1354,40 @@ impl<W: LayoutElement> Layout<W> {
let _span = tracy_client::span!("Layout::advance_animations");
match &mut self.monitor_set {
- MonitorSet::Normal {
- monitors,
- active_monitor_idx,
- ..
- } => {
- for (idx, mon) in monitors.iter_mut().enumerate() {
- mon.advance_animations(current_time, idx == *active_monitor_idx);
+ MonitorSet::Normal { monitors, .. } => {
+ for mon in monitors {
+ mon.advance_animations(current_time);
}
}
MonitorSet::NoOutputs { workspaces, .. } => {
for ws in workspaces {
- ws.advance_animations(current_time, false);
+ ws.advance_animations(current_time);
}
}
}
}
+ pub fn update_render_elements(&mut self, output: &Output) {
+ let _span = tracy_client::span!("Layout::update_render_elements");
+
+ let MonitorSet::Normal {
+ monitors,
+ active_monitor_idx,
+ ..
+ } = &mut self.monitor_set
+ else {
+ error!("update_render_elements called with no monitors");
+ return;
+ };
+
+ for (idx, mon) in monitors.iter_mut().enumerate() {
+ if mon.output == *output {
+ mon.update_render_elements(idx == *active_monitor_idx);
+ return;
+ }
+ }
+ }
+
pub fn update_shaders(&mut self) {
match &mut self.monitor_set {
MonitorSet::Normal { monitors, .. } => {