From ab21df1943c1e9355e973631730cd62539f2091d Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Wed, 29 Dec 2021 15:56:00 +0100 Subject: [PATCH] space: Return new damage on render --- src/desktop/space/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/desktop/space/mod.rs b/src/desktop/space/mod.rs index 08b5b3e..7065ec2 100644 --- a/src/desktop/space/mod.rs +++ b/src/desktop/space/mod.rs @@ -411,7 +411,7 @@ impl Space { custom_elements: &[Box< dyn RenderElement::Frame, ::Error, ::TextureId>, >], - ) -> Result> + ) -> Result>>, RenderError> where R: Renderer + ImportAll + 'static, R::TextureId: 'static, @@ -520,7 +520,7 @@ impl Space { }); if damage.is_empty() { - return Ok(false); + return Ok(None); } let output_transform: Transform = output.current_transform().into(); @@ -605,9 +605,9 @@ impl Space { (ToplevelId::from(elem), geo) }) .collect(); - state.old_damage.push_front(new_damage); + state.old_damage.push_front(new_damage.clone()); - Ok(true) + Ok(Some(new_damage)) } pub fn send_frames(&self, all: bool, time: u32) {