summaryrefslogtreecommitdiffstats
path: root/winit/src/program.rs
diff options
context:
space:
mode:
authorLibravatar Héctor <hector@hecrj.dev>2025-02-03 22:49:28 +0100
committerLibravatar GitHub <noreply@github.com>2025-02-03 22:49:28 +0100
commit5ab056318e7c2db981f008bd65d9e0b2aacb46c5 (patch)
tree5aa3e2cdb69dd85fe247ba15c8cfc22bb53dd961 /winit/src/program.rs
parentca009ba92af72c09ec6f22ca4eea06fe6228f19d (diff)
parentbab18858cd60168b63ae442026f45a90eb6be731 (diff)
downloadiced-5ab056318e7c2db981f008bd65d9e0b2aacb46c5.tar.gz
iced-5ab056318e7c2db981f008bd65d9e0b2aacb46c5.tar.bz2
iced-5ab056318e7c2db981f008bd65d9e0b2aacb46c5.zip
Merge pull request #2777 from kenz-gelsoft/explore-input-method2
Input Method Support
Diffstat (limited to 'winit/src/program.rs')
-rw-r--r--winit/src/program.rs42
1 files changed, 17 insertions, 25 deletions
diff --git a/winit/src/program.rs b/winit/src/program.rs
index d8436212..7ead4c3b 100644
--- a/winit/src/program.rs
+++ b/winit/src/program.rs
@@ -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