Skip to content

Commit

Permalink
Update lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Jun 12, 2024
1 parent e361d65 commit 8564848
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ impl State {
self.allow_ime = ime.allowed_ime;
crate::profile_scope!("set_ime_allowed");
self.egui_ctx.send_viewport_cmd_to(
*viewport_id,
self.viewport_id,
ViewportCommand::IMEAllowed(self.allow_ime),
);
}
Expand All @@ -845,13 +845,13 @@ impl State {
let is_need_cursor_area = self.ime_rect_px != Some(ime_rect_px)
&& self
.egui_ctx
.input_for(*viewport_id, |i| !i.events.is_empty());
.input_for(self.viewport_id, |i| !i.events.is_empty());

if is_need_cursor_area {
self.ime_rect_px = Some(ime_rect_px);
crate::profile_scope!("set_ime_cursor_area");
self.egui_ctx.send_viewport_cmd_to(
*viewport_id,
self.viewport_id,
ViewportCommand::IMERect(ime.cursor_rect),
);
} else {
Expand Down

0 comments on commit 8564848

Please sign in to comment.