Add neutral None variant to InputMethod

This commit is contained in:
Héctor Ramón Jiménez 2025-02-02 21:06:50 +01:00
parent ae10adda74
commit db990b77e4
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 19 additions and 9 deletions

View file

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