egui/tests
Lucas Meurer 0ef57d5a1d Fix `ui.response().interact(Sense::click())` being flakey (#7713)
This fixes calls to `ui.response().interact(Sense::click())` being
flakey. Since egui checks widget interactions at the beginning of the
frame, based on the responses from last frame, we need to ensure that we
always call `create_widget` on `interact` calls, otherwise there can be
a feedback loop where the `Sense` egui acts on flips back and forth
between frames.

Without the fix in `interact`, both the asserts in the new test fail.

Here is a video where I experienced the bug, showing the sense switching
every frame. Every other click would fail to be detected.


https://github.com/user-attachments/assets/6be7ca0e-b50f-4d30-bf87-bbb80c319f3b

Also note, usually it's better to use `UiBuilder::sense()` to give a Ui
some sense, but sometimes you don't have the flexibility, e.g. in a `Ui`
callback from some code external to your project.
2025-11-13 13:53:59 +01:00
..
egui_tests Fix `ui.response().interact(Sense::click())` being flakey (#7713) 2025-11-13 13:53:59 +01:00
test_egui_extras_compilation Add `taplo.toml` for toml formatting (#7618) 2025-10-09 15:38:00 +02:00
test_inline_glow_paint Add `taplo.toml` for toml formatting (#7618) 2025-10-09 15:38:00 +02:00
test_size_pass Add `taplo.toml` for toml formatting (#7618) 2025-10-09 15:38:00 +02:00
test_ui_stack Use more workspace dependencies (#7596) 2025-10-07 15:07:16 +02:00
test_viewports Add `taplo.toml` for toml formatting (#7618) 2025-10-09 15:38:00 +02:00
README.md Move test crates to own folder (#4554) 2024-05-27 21:28:33 +02:00

README.md

Test apps

Some application to tests various parts of egui and eframe.

At some point it would be nice to have automatic screenshot regression tests for these.