Skip to content

Commit

Permalink
Update lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Jul 13, 2024
1 parent 61276db commit 4fbebbc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -844,14 +844,12 @@ impl State {
.any(|event| matches!(event, egui::Event::Ime(_)))
});

if self.ime_rect != Some(ime_rect) || has_ime_event {
if has_ime_event || self.ime_rect != Some(ime_rect) {
self.ime_rect = Some(ime_rect);
crate::profile_scope!("set_ime_cursor_area");
self.egui_ctx
.send_viewport_cmd_to(self.viewport_id, ViewportCommand::IMERect(ime_rect));
}
} else {
self.ime_rect = None;
}
} else {
self.ime_rect = None;
Expand Down

0 comments on commit 4fbebbc

Please sign in to comment.