summaryrefslogtreecommitdiffstats
path: root/winit/src/program.rs
diff options
context:
space:
mode:
Diffstat (limited to 'winit/src/program.rs')
-rw-r--r--winit/src/program.rs44
1 files changed, 18 insertions, 26 deletions
diff --git a/winit/src/program.rs b/winit/src/program.rs
index d8436212..9a64fa51 100644
--- a/winit/src/program.rs
+++ b/winit/src/program.rs
@@ -363,7 +363,7 @@ where
(
ControlFlow::WaitUntil(current),
ControlFlow::WaitUntil(new),
- ) if new < current => {}
+ ) if current < new => {}
(
ControlFlow::WaitUntil(target),
ControlFlow::Wait,
@@ -873,20 +873,16 @@ async fn run_instance<P, C>(
});
if let user_interface::State::Updated {
- redraw_request: Some(redraw_request),
+ redraw_request,
+ input_method,
} = ui_state
{
- match redraw_request {
- window::RedrawRequest::NextFrame => {
- window.raw.request_redraw();
- window.redraw_at = None;
- }
- window::RedrawRequest::At(at) => {
- window.redraw_at = Some(at);
- }
- }
+ window.request_redraw(redraw_request);
+ window.request_input_method(input_method);
}
+ window.draw_preedit();
+
debug.render_started();
match compositor.present(
&mut window.renderer,
@@ -1029,27 +1025,23 @@ async fn run_instance<P, C>(
);
#[cfg(feature = "unconditional-rendering")]
- window.raw.request_redraw();
+ window.request_redraw(
+ window::RedrawRequest::NextFrame,
+ );
match ui_state {
- #[cfg(not(
- feature = "unconditional-rendering"
- ))]
user_interface::State::Updated {
- redraw_request: Some(redraw_request),
- } => match redraw_request {
- window::RedrawRequest::NextFrame => {
- window.raw.request_redraw();
- window.redraw_at = None;
- }
- window::RedrawRequest::At(at) => {
- window.redraw_at = Some(at);
- }
- },
+ redraw_request: _redraw_request,
+ ..
+ } => {
+ #[cfg(not(
+ feature = "unconditional-rendering"
+ ))]
+ window.request_redraw(_redraw_request);
+ }
user_interface::State::Outdated => {
uis_stale = true;
}
- user_interface::State::Updated { .. } => {}
}
for (event, status) in window_events