mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Only repaint on cursor movements of area, or if dragging outside (#4730)
* Closes https://github.com/emilk/egui/issues/4723 Also fix some small bugs in the touch input on web
This commit is contained in:
@@ -15,7 +15,6 @@ pub struct AppRunner {
|
||||
pub(crate) needs_repaint: std::sync::Arc<NeedRepaint>,
|
||||
last_save_time: f64,
|
||||
pub(crate) text_agent: TextAgent,
|
||||
pub(crate) mutable_text_under_cursor: bool,
|
||||
|
||||
// Output for the last run:
|
||||
textures_delta: TexturesDelta,
|
||||
@@ -121,7 +120,6 @@ impl AppRunner {
|
||||
needs_repaint,
|
||||
last_save_time: now_sec(),
|
||||
text_agent,
|
||||
mutable_text_under_cursor: false,
|
||||
textures_delta: Default::default(),
|
||||
clipped_primitives: None,
|
||||
};
|
||||
@@ -275,7 +273,7 @@ impl AppRunner {
|
||||
#[cfg(not(web_sys_unstable_apis))]
|
||||
let _ = copied_text;
|
||||
|
||||
self.mutable_text_under_cursor = mutable_text_under_cursor;
|
||||
self.text_agent.set_focus(mutable_text_under_cursor);
|
||||
|
||||
if let Err(err) = self.text_agent.move_to(ime, self.canvas()) {
|
||||
log::error!(
|
||||
|
||||
Reference in New Issue
Block a user