From d0037fbb287d9fafe5c7a24347d68cac5be3eafd Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Fri, 17 Jan 2025 17:54:13 +0100 Subject: [PATCH] compositor: Fix cursor redraw on scale change --- src/backend/drm/compositor/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backend/drm/compositor/mod.rs b/src/backend/drm/compositor/mod.rs index 493a96a83520..c08885c72f5e 100644 --- a/src/backend/drm/compositor/mod.rs +++ b/src/backend/drm/compositor/mod.rs @@ -508,6 +508,7 @@ struct PlaneElementState { id: Id, commit: CommitCounter, z_index: usize, + cursor_size: Option>, } #[derive(Debug)] @@ -3133,7 +3134,9 @@ where .unwrap_or(true) || previous_element_state .map(|element_state| { - element_state.id != *element.id() || element.current_commit() != element_state.commit + element_state.id != *element.id() + || element.current_commit() != element_state.commit + || element_state.cursor_size != Some(element_size) }) .unwrap_or(true) || previous_state @@ -3394,6 +3397,7 @@ where id: element.id().clone(), commit: element.current_commit(), z_index: element_zindex, + cursor_size: Some(element_size), }), config: Some(config), }; @@ -4003,6 +4007,7 @@ where id: element_id.clone(), commit: element.current_commit(), z_index: element_config.z_index, + cursor_size: None, }), config: Some(config), };