-
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
Unnecessary re-render when moving windows in eframe #1979
Comments
I don't think this is a bug. But it would be nice to have better behavior. I think it should be possible to keep data from the previous frame to decide whether a redraw is needed or not. Components would save there a bounding box of the area they are interested in along with the type of event (enter, leave, move...). Before rendering, the library could check if the mouse is interacting with those areas. |
@emilk thank you for fast respond. |
Use |
thank you for the answer, I used |
Describe the bug
I don't know why but eframe will render gui in any mouse event on the program, even outside of the gui itself, like when moving the window by dragging titlebar...
I don't think that this behavior should be the default... because there is no need to render gui itself when just moving the windows...
other gui library like imgui (using example backends) wont re-render on this kind of events
To Reproduce
Steps to reproduce the behavior:
Expected behavior
eframe shouldn't re-render the gui when user simply moving the program window itself (and there isn't any input or update to gui itself)
Screenshots
no input or update in gui itself, just moving program windows (really fast...)
Desktop (please complete the following information):
Additional context
The interesting thing is if we try to move the window using arrow key in keyboard using the option in windows menu (I can recall exact name of it) there is no re-render, because seems like eframe will render gui only on mouse events
The text was updated successfully, but these errors were encountered: