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
|
|
@ -624,7 +624,7 @@ where
|
|||
focus.is_window_focused = true;
|
||||
focus.updated_at = Instant::now();
|
||||
|
||||
shell.request_redraw(window::RedrawRequest::NextFrame);
|
||||
shell.request_redraw();
|
||||
}
|
||||
}
|
||||
Event::Window(window::Event::RedrawRequested(now)) => {
|
||||
|
|
@ -637,11 +637,11 @@ where
|
|||
- (now - focus.updated_at).as_millis()
|
||||
% Focus::CURSOR_BLINK_INTERVAL_MILLIS;
|
||||
|
||||
shell.request_redraw(window::RedrawRequest::At(
|
||||
shell.request_redraw_at(
|
||||
now + Duration::from_millis(
|
||||
millis_until_redraw as u64,
|
||||
),
|
||||
));
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue