-
Notifications
You must be signed in to change notification settings - Fork 491
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
Wish: Window size/position change event #61
Comments
Yes, I've been planning to add stuff like this "as needed". Also things like minimized/maximized/restored and 'quit-requested' events. Please don't bother with a PR though, sokol_app.h is still quite a bit in flux. It'll go in within the next few days I think. |
Ok... I have it running if you would want it. Btw... I have related question... so far when you drag window or resize it, it halts the main thread. It would be better if content inside was not halted. Do you want to change it too? Thanks. |
The 'halt-the-main-thread' thing only happens on Windows, I guess because moving/resizing is "modal" there. It would be good to fix this, do you know what the recommend fix for this is (I guess calling the frame callback during a WM_* message?). |
Maybe this helps: https://stackoverflow.com/a/18043461/494472 |
I think that the only proper way is to use separate thread. GLFW examples are working the same way.. only the GLFW's |
Hmm, no IMHO a separate thread is out of question. I'd rather have no updates during moving/resizing. I'll play around with it a bit, I think a lot can be achieved by calling the frame callback from within the WinProc. |
If separate thread is out of question, than there is only option described in:
As there is small delay before |
FYI I have started to implement resize, iconified and restored (un-iconified) events. This is basically a subset of what GLFW is doing (and also implemented in the same way). If it makes sense I'll also add a focused/unfocused event later. I left out the position-changed event, do you know of a scenario where this is required? IMHO size changes is the most important (I also removed the per-frame check for size changes on the platforms where those events are implemented, currently only MacOS and Win32). |
Similar sokol-app events have been implemented now, closing this... |
Hi Andre,
do you plan to add event for window size/pos changes? I'm volunteering to write it for Win32, if you don't have it already in private.
The text was updated successfully, but these errors were encountered: