From 7979125ed793918dd4a0e5a1ddec8d17bffbd5bf Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 12 Feb 2025 08:46:35 +0100 Subject: Simplify `InputMethod` API with only two states Co-authored-by: rhysd Co-authored-by: KENZ --- widget/src/scrollable.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'widget/src/scrollable.rs') diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index fe71fd6b..0cf75c04 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -729,7 +729,7 @@ where _ => mouse::Cursor::Unavailable, }; - let had_input_method = shell.input_method().is_open(); + let had_input_method = shell.input_method().is_enabled(); let translation = state.translation(self.direction, bounds, content_bounds); @@ -750,7 +750,7 @@ where ); if !had_input_method { - if let InputMethod::Open { position, .. } = + if let InputMethod::Enabled { position, .. } = shell.input_method_mut() { *position = *position - translation; -- cgit