From db990b77e4aa8d001c774703301342c951d6caaa Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 2 Feb 2025 21:06:50 +0100 Subject: Add neutral `None` variant to `InputMethod` --- winit/src/program/window_manager.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'winit') diff --git a/winit/src/program/window_manager.rs b/winit/src/program/window_manager.rs index cd49a8b4..32faa059 100644 --- a/winit/src/program/window_manager.rs +++ b/winit/src/program/window_manager.rs @@ -203,10 +203,13 @@ where } pub fn request_input_method(&mut self, input_method: InputMethod) { - self.raw.set_ime_allowed(match input_method { - InputMethod::Disabled => false, - InputMethod::Allowed | InputMethod::Open { .. } => true, - }); + match input_method { + InputMethod::None => {} + InputMethod::Disabled => self.raw.set_ime_allowed(false), + InputMethod::Allowed | InputMethod::Open { .. } => { + self.raw.set_ime_allowed(true) + } + } if let InputMethod::Open { position, -- cgit