summaryrefslogtreecommitdiffstats
path: root/winit
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-02 17:55:16 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-02 17:55:16 +0100
commitd5ee9c27955e6dfeb645e2641f3d24b006685484 (patch)
treeed197dce7628fada4bd7842d122ca253698f136c /winit
parent0c6d4eb23f07e0ab424dc22dd198924b8540192a (diff)
downloadiced-d5ee9c27955e6dfeb645e2641f3d24b006685484.tar.gz
iced-d5ee9c27955e6dfeb645e2641f3d24b006685484.tar.bz2
iced-d5ee9c27955e6dfeb645e2641f3d24b006685484.zip
Copy `winit` docs for `input_method::Event`
Diffstat (limited to 'winit')
-rw-r--r--winit/src/conversion.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs
index a289f060..c7f9aaaf 100644
--- a/winit/src/conversion.rs
+++ b/winit/src/conversion.rs
@@ -289,7 +289,10 @@ pub fn window_event(
println!("ime event: {:?}", ime);
Some(Event::InputMethod(match ime {
Ime::Enabled => input_method::Event::Enabled,
- Ime::Preedit(s, size) => input_method::Event::Preedit(s, size),
+ Ime::Preedit(s, size) => input_method::Event::Preedit(
+ s,
+ size.map(|(start, end)| (start..end)),
+ ),
Ime::Commit(s) => input_method::Event::Commit(s),
Ime::Disabled => input_method::Event::Disabled,
}))