1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

Move IME candidate window following text cursor (#258)

* egui_web: enable IME support on web.

* Move candidate window following text cursor.

* Preclude too frequent agent movement.

* IME candidate window move on native app.
This commit is contained in:
Lin Han
2021-03-30 14:48:55 +08:00
committed by GitHub
parent 1c60dc8d66
commit 22cd1a8e10
6 changed files with 74 additions and 11 deletions

View File

@@ -212,7 +212,7 @@ pub fn run(mut app: Box<dyn epi::App>) -> ! {
set_cursor_icon(&display, egui_output.cursor_icon);
current_cursor_icon = egui_output.cursor_icon;
handle_output(egui_output, clipboard.as_mut());
handle_output(egui_output, clipboard.as_mut(), &display);
// TODO: handle app_output
// eprintln!("Warmed up in {} ms", warm_up_start.elapsed().as_millis())
@@ -289,7 +289,7 @@ pub fn run(mut app: Box<dyn epi::App>) -> ! {
set_cursor_icon(&display, egui_output.cursor_icon);
current_cursor_icon = egui_output.cursor_icon;
}
handle_output(egui_output, clipboard.as_mut());
handle_output(egui_output, clipboard.as_mut(), &display);
#[cfg(feature = "persistence")]
if let Some(storage) = &mut storage {