Skip to content

Commit ba755c6

Browse files
committed
Fulfill InputMethod requests only during RedrawRequested
1 parent c9abe25 commit ba755c6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

core/src/shell.rs

+3
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ impl<'a, Message> Shell<'a, Message> {
7878
}
7979

8080
/// Requests the current [`InputMethod`] strategy.
81+
///
82+
/// __Important__: This request will only be honored by the
83+
/// [`Shell`] only during a [`window::Event::RedrawRequested`].
8184
pub fn request_input_method<T: AsRef<str>>(
8285
&mut self,
8386
ime: &InputMethod<T>,

winit/src/program.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1025,19 +1025,19 @@ async fn run_instance<P, C>(
10251025
);
10261026

10271027
#[cfg(feature = "unconditional-rendering")]
1028-
window.raw.request_redraw();
1028+
window.request_redraw(
1029+
window::RedrawRequest::NextFrame,
1030+
);
10291031

10301032
match ui_state {
10311033
user_interface::State::Updated {
10321034
redraw_request: _redraw_request,
1033-
input_method,
1035+
..
10341036
} => {
10351037
#[cfg(not(
10361038
feature = "unconditional-rendering"
10371039
))]
10381040
window.request_redraw(_redraw_request);
1039-
1040-
window.request_input_method(input_method);
10411041
}
10421042
user_interface::State::Outdated => {
10431043
uis_stale = true;

0 commit comments

Comments
 (0)