Ignore redraws of invisible content in hover widget

This commit is contained in:
Héctor Ramón Jiménez 2025-02-03 04:34:13 +01:00
parent 599d8b560b
commit 3029481b72
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 23 additions and 3 deletions

View file

@ -80,6 +80,18 @@ impl<'a, Message> Shell<'a, Message> {
self.redraw_request
}
/// Replaces the redraw request of the [`Shell`]; without conflict resolution.
///
/// This is useful if you want to overwrite the redraw request to a previous value.
/// Since it's a fairly advanced use case and should rarely be used, it is a static
/// method.
pub fn replace_redraw_request(
shell: &mut Self,
redraw_request: Option<window::RedrawRequest>,
) {
shell.redraw_request = redraw_request;
}
/// Returns whether the current layout is invalid or not.
pub fn is_layout_invalid(&self) -> bool {
self.is_layout_invalid