Skip to content

Commit

Permalink
Update lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Apr 30, 2024
1 parent 2fabde1 commit fe28ee9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,14 @@ impl State {
.push(egui::Event::Ime(egui::ImeEvent::Enabled));
self.has_sent_ime_enabled = true;
}
winit::event::Ime::Preedit(_, None) => {}
winit::event::Ime::Preedit(_, None) => {
if !self.has_sent_ime_enabled {
self.egui_input
.events
.push(egui::Event::Ime(egui::ImeEvent::Enabled));
self.has_sent_ime_enabled = true;
}
}
winit::event::Ime::Preedit(text, Some(_cursor)) => {
if !self.has_sent_ime_enabled {
self.egui_input
Expand Down

0 comments on commit fe28ee9

Please sign in to comment.