Open Saecki opened 1 week ago
Describe the bug The touch screen pointer does never release, so input.interact_pos() always stays Some(...).
input.interact_pos()
Some(...)
To Reproduce Steps to reproduce the behavior:
I can reproduce the behavior described above with the following egui app:
Cargo.toml
[package] name = "egui_touchscreen_repro" version = "0.1.0" edition = "2021" [dependencies] egui = { git = "https://github.com/emilk/egui", branch = "master" } eframe = { git = "https://github.com/emilk/egui", branch = "master" }
main.rs
use eframe::NativeOptions; use egui::CentralPanel; fn main() { eframe::run_native( "touch_screen_test", NativeOptions::default(), Box::new(|_cc| Ok(Box::new(TouchScreenApp))), ) .expect("error running app"); } struct TouchScreenApp; impl eframe::App for TouchScreenApp { fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { CentralPanel::default().show(ctx, |ui| { let pos = ui.input(|i| i.pointer.interact_pos()); let text = format!("{pos:?}"); ui.label(text); }); } }
Screenshots
Expected behavior The pointer should be released after the finger leaves the screen.
Desktop (please complete the following information):
After some more investigation I found this still works with egui 0.24 but breaks with 0.25.
0.24
0.25
Describe the bug The touch screen pointer does never release, so
input.interact_pos()
always staysSome(...)
.To Reproduce Steps to reproduce the behavior:
I can reproduce the behavior described above with the following egui app:
Cargo.toml
main.rs
Screenshots![image](https://github.com/emilk/egui/assets/43008152/b6830bc0-d6a9-4db5-950a-10d137a7f619)
Expected behavior The pointer should be released after the finger leaves the screen.
Desktop (please complete the following information):