diff --git a/.gitmodules b/.gitmodules index fdaf8abe..32a86113 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "iced"] path = iced - url = https://github.com/pop-os/iced.git - branch = master + url = https://github.com/kenz-gelsoft/iced.git + branch = backport-input-method2 [submodule "icon-theme"] path = cosmic-icons url = https://github.com/pop-os/cosmic-icons diff --git a/iced b/iced index 10db38f9..3f869563 160000 --- a/iced +++ b/iced @@ -1 +1 @@ -Subproject commit 10db38f982001a714bd94e99a082368762b378ee +Subproject commit 3f86956359b68949350f066941860121c41bb518 diff --git a/src/widget/text_input/input.rs b/src/widget/text_input/input.rs index 5cd20bda..a557bc01 100644 --- a/src/widget/text_input/input.rs +++ b/src/widget/text_input/input.rs @@ -2168,10 +2168,6 @@ fn input_method<'b>( return InputMethod::Disabled; }; - let Some(preedit) = &state.preedit else { - return InputMethod::Allowed; - }; - let text_bounds = text_layout.bounds(); let cursor_index = match state.cursor.state(value) { cursor::State::Index(position) => position, @@ -2183,14 +2179,14 @@ fn input_method<'b>( x: text_bounds.x + cursor - offset, y: text_bounds.y + text_bounds.height, }; - InputMethod::Open { + InputMethod::Enabled { position: bottom_left, purpose: if state.is_secure { input_method::Purpose::Secure } else { input_method::Purpose::Normal }, - preedit: Some(preedit.as_ref()), + preedit: state.preedit.as_ref().map(input_method::Preedit::as_ref), } }