-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On Wayland, app repaints every frame if IME output is set #4254
Comments
I don't see anything wrong with egui that would be causing this to happen. Rather, it's being caused by this call here to the function egui/crates/egui-winit/src/lib.rs Lines 819 to 833 in 4d4cb3d
The Wayland implementation of that function is somehow triggering egui apps to repaint every time it's called. I'll try to get this fixed in winit. |
…put is not None (#4269) * Closes #4254 Changes egui-winit so that it calls `window.set_ime_cursor_area` when the IME rect changes or the user interacts with the application instead of calling it every time the app is rendered. This works around a winit bug that causes the app to continuously repaint under certain circumstances on Wayland. Tested on Wayland and on X11 using the text edit in the egui_demo_app - no changes in IME functionality as far as I can tell. Untested on non-Linux platforms. --------- Co-authored-by: Emil Ernerfeldt <[email protected]>
…put is not None (#4269) * Closes #4254 Changes egui-winit so that it calls `window.set_ime_cursor_area` when the IME rect changes or the user interacts with the application instead of calling it every time the app is rendered. This works around a winit bug that causes the app to continuously repaint under certain circumstances on Wayland. Tested on Wayland and on X11 using the text edit in the egui_demo_app - no changes in IME functionality as far as I can tell. Untested on non-Linux platforms. --------- Co-authored-by: Emil Ernerfeldt <[email protected]>
…put is not None (#4269) * Closes #4254 Changes egui-winit so that it calls `window.set_ime_cursor_area` when the IME rect changes or the user interacts with the application instead of calling it every time the app is rendered. This works around a winit bug that causes the app to continuously repaint under certain circumstances on Wayland. Tested on Wayland and on X11 using the text edit in the egui_demo_app - no changes in IME functionality as far as I can tell. Untested on non-Linux platforms. --------- Co-authored-by: Emil Ernerfeldt <[email protected]>
…put is not None (emilk#4269) * Closes emilk#4254 Changes egui-winit so that it calls `window.set_ime_cursor_area` when the IME rect changes or the user interacts with the application instead of calling it every time the app is rendered. This works around a winit bug that causes the app to continuously repaint under certain circumstances on Wayland. Tested on Wayland and on X11 using the text edit in the egui_demo_app - no changes in IME functionality as far as I can tell. Untested on non-Linux platforms. --------- Co-authored-by: Emil Ernerfeldt <[email protected]>
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 notNone
is when anegui::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:
cargo run -p egui_demo_app
Expected behavior
The app should not repaint every frame when the text edit is selected.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: