mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
Send empty Ime::Preedit before the Ime::Commit
This should help downstream to automatically clear it.
This commit is contained in:
@@ -431,6 +431,10 @@ declare_class!(
|
||||
let is_control = string.chars().next().map_or(false, |c| c.is_control());
|
||||
|
||||
if self.is_ime_enabled() && !is_control {
|
||||
AppState::queue_event(EventWrapper::StaticEvent(Event::WindowEvent {
|
||||
window_id: self.window_id(),
|
||||
event: WindowEvent::Ime(Ime::Preedit(String::new(), None)),
|
||||
}));
|
||||
AppState::queue_event(EventWrapper::StaticEvent(Event::WindowEvent {
|
||||
window_id: self.window_id(),
|
||||
event: WindowEvent::Ime(Ime::Commit(string)),
|
||||
|
||||
Reference in New Issue
Block a user