Report cursor size to InputMethod

Co-authored-by: dcz-self <dcz-self@users.noreply.github.com>
This commit is contained in:
dcz 2025-05-01 13:03:54 +00:00 committed by Héctor Ramón Jiménez
parent e163333161
commit d22da7d261
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
5 changed files with 31 additions and 20 deletions

View file

@ -365,11 +365,13 @@ where
self.text_size.unwrap_or_else(|| renderer.default_size()),
);
let position =
cursor + translation + Vector::new(0.0, f32::from(line_height));
let position = cursor + translation;
InputMethod::Enabled {
position,
cursor: Rectangle::new(
position,
Size::new(0.0, f32::from(line_height)),
),
purpose: input_method::Purpose::Normal,
preedit: state.preedit.as_ref().map(input_method::Preedit::as_ref),
}