Describe the bug
On Linux with Wayland, when an egui app using eframe has ui.output(|o| o.ime) not equal to None, the app continuously repaints.
One example of when ui.output(|o| o.ime) is not None is when an egui::widgets::TextEdit is focused because it is set by the widget in order to allow IMEs to determine where the cursor is.
I haven't tested this on non-Linux machines, but WebAssembly apps in browsers on Linux don't seem to have this problem, nor do apps for Windows running in Wine on Linux. Linux with X11 doesn't have this problem either.
To Reproduce
Steps to reproduce the behavior:
- Clone egui and checkout to the 0.27.0 tag
cargo run -p egui_demo_app
- Make sure "Backend" is selected in the top-left corner of the app so that the left pane is visible
- Set the rendering mode to "Reactive" in the left pane so that the app doesn't repaint unless it has to
- Focus the text edit in the widget gallery or any other text edit
- Observe that the "Mean CPU usage" in the left pane constantly updates, meaning the app is repainting every frame
Expected behavior
The app should not repaint every frame when the text edit is selected.
Desktop (please complete the following information):
- OS: Arch Linux with GNOME 46
- Version: Linux unknown 6.8.1-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Sat, 16 Mar 2024 17:15:23 +0000 x86_64 GNU/Linux
Describe the bug
On Linux with Wayland, when an egui app using eframe has
ui.output(|o| o.ime)not equal toNone, the app continuously repaints.One example of when
ui.output(|o| o.ime)is notNoneis when anegui::widgets::TextEditis focused because it is set by the widget in order to allow IMEs to determine where the cursor is.I haven't tested this on non-Linux machines, but WebAssembly apps in browsers on Linux don't seem to have this problem, nor do apps for Windows running in Wine on Linux. Linux with X11 doesn't have this problem either.
To Reproduce
Steps to reproduce the behavior:
cargo run -p egui_demo_appExpected behavior
The app should not repaint every frame when the text edit is selected.
Desktop (please complete the following information):