Skip to content

Commit

Permalink
compositor: Fix cursor redraw on scale change
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix committed Jan 17, 2025
1 parent fe31867 commit 953959e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/backend/drm/compositor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ struct PlaneElementState {
id: Id,
commit: CommitCounter,
z_index: usize,
cursor_size: Option<Size<i32, Physical>>,
}

#[derive(Debug)]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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),
};
Expand Down Expand Up @@ -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),
};
Expand Down

0 comments on commit 953959e

Please sign in to comment.