Update libcosmic for updated iced API

This commit is contained in:
KENZ 2025-02-23 10:10:27 +09:00
parent 9f24ee85e1
commit 6c929f595c
3 changed files with 5 additions and 9 deletions

4
.gitmodules vendored
View file

@ -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

2
iced

@ -1 +1 @@
Subproject commit 10db38f982001a714bd94e99a082368762b378ee
Subproject commit 3f86956359b68949350f066941860121c41bb518

View file

@ -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),
}
}