-
Notifications
You must be signed in to change notification settings - Fork 79
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
Feature request: on expose callback #35
Comments
how could we detect such thing? |
As far as I'm aware, the backend should provide something the means. Xlib provides such an event: https://tronche.com/gui/x/xlib/events/exposure/expose.html and imagine others provide similar things. SDL wraps this event as well: https://www.libsdl.org/release/SDL-1.2.15/docs/html/sdlexposeevent.html |
The thing is, we use this event to force repaint the window. Let me do some tests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! I love this little library, fast and easy. <3
I was wondering if you would be interested in adding an "on expose" callback, which gets called when the window needs to be redrawn for any reason?
This would be useful for me because with the way I'm using the library, I'm not redrawing the window continuously for continuous animation. Rather, I'm redrawing only when something changes, or perhaps I'm only drawing a single static frame for the lifetime of the window.
Currently, without an "on expose" callback, this leads to an issue, because without redrawing the frame constantly, the window collects artifacts as other items on the screen cover up the contents of the window. It would also be very useful to know when the window has been created and is ready to be drawn for the first time.
The text was updated successfully, but these errors were encountered: