Skip to content

Commit

Permalink
Update lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored May 5, 2024
1 parent 0a53ebf commit 5100d91
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,11 @@ impl State {
// We use input_method_editor_started to manually insert CompositionStart
// between Commits.
match ime {
winit::event::Ime::Enabled | winit::event::Ime::Preedit(_, None) => {
winit::event::Ime::Enabled => {
// `ime_event_enable()` is not called here.
// Because the IME used in China generates `Preedit(_, None)` and `Commit(text)`.
}
winit::event::Ime::Preedit(_, None) => {
self.ime_event_enable();
}
winit::event::Ime::Preedit(text, Some(_cursor)) => {
Expand Down Expand Up @@ -1399,6 +1403,7 @@ fn process_viewport_command(
}
ViewportCommand::Title(title) => {
window.set_title(&title);
info.title = Some(title);
}
ViewportCommand::Transparent(v) => {
window.set_transparent(v);
Expand Down

0 comments on commit 5100d91

Please sign in to comment.