Split Shell::request_redraw into two different methods
This commit is contained in:
parent
7fbc195b11
commit
752403d70c
15 changed files with 89 additions and 114 deletions
|
|
@ -345,13 +345,11 @@ where
|
|||
|
||||
if let Event::Window(window::Event::RedrawRequested(_now)) = event {
|
||||
self.last_status = Some(current_status);
|
||||
} else {
|
||||
match self.last_status {
|
||||
Some(status) if status != current_status => {
|
||||
shell.request_redraw(window::RedrawRequest::NextFrame);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
} else if self
|
||||
.last_status
|
||||
.is_some_and(|status| status != current_status)
|
||||
{
|
||||
shell.request_redraw();
|
||||
}
|
||||
|
||||
event::Status::Ignored
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue