From bfd81fc2904ba35ae7ccb979e8cb4b2d244fb2dd Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 5 Feb 2025 10:08:56 +0300 Subject: Make send_frame() a function on Mapped We'll add some extra logic there. --- src/niri.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/niri.rs') diff --git a/src/niri.rs b/src/niri.rs index a7fc872f..96d52686 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -3895,7 +3895,7 @@ impl Niri { } } - pub fn send_frame_callbacks(&self, output: &Output) { + pub fn send_frame_callbacks(&mut self, output: &Output) { let _span = tracy_client::span!("Niri::send_frame_callbacks"); let state = self.output_state.get(output).unwrap(); @@ -3936,8 +3936,8 @@ impl Niri { let frame_callback_time = get_monotonic_time(); - for mapped in self.layout.windows_for_output(output) { - mapped.window.send_frame( + for mapped in self.layout.windows_for_output_mut(output) { + mapped.send_frame( output, frame_callback_time, FRAME_CALLBACK_THROTTLE, @@ -3985,7 +3985,7 @@ impl Niri { } } - pub fn send_frame_callbacks_on_fallback_timer(&self) { + pub fn send_frame_callbacks_on_fallback_timer(&mut self) { let _span = tracy_client::span!("Niri::send_frame_callbacks_on_fallback_timer"); // Make up a bogus output; we don't care about it here anyway, just the throttling timer. @@ -4002,8 +4002,8 @@ impl Niri { let frame_callback_time = get_monotonic_time(); - self.layout.with_windows(|mapped, _, _| { - mapped.window.send_frame( + self.layout.with_windows_mut(|mapped, _| { + mapped.send_frame( output, frame_callback_time, FRAME_CALLBACK_THROTTLE, -- cgit