-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add SDL_SetModalLoopCallback, SDL_SetModalLoopResizeCallback and SDL_SetModalLoopMoveCallback functions #4836
Conversation
I think it is ready to be reviewed. |
Looks like this needs to be updated for 2.0.22 now since it didn't make it in for 2.0.18 or 2.0.20. |
Done. 😉 |
Perhaps there should also be a callback specifically for WM_MOVE. The window enters the same modal loop when being dragged, and some applications may want to update the window contents based on the window's position on the screen as well as its size. |
c288723
to
c7ef1f4
Compare
…SetModalLoopMoveCallback functions
c7ef1f4
to
b20da04
Compare
Sorry, just checking if there's something blocking this? Would love to see this issue closed after nearly nine years 😅 |
This is interesting, but ideally we would find a way to handle this so you don't need specialized callbacks to deal with move and resize. Here is another thread with more info on this that I would like to research for SDL 3.0: |
Fair enough, if you can implement this without the need to use callbacks, it would be perfect indeed. 😃 Should we close this PR? |
No, let's leave it open because it might end up being the best solution. |
I've added a solution that dovetails nicely with the new main callbacks in SDL 3.0. Thanks for the example and all the feedback! |
Add three functions to set callbacks to be called during a window modal loop, allowing the user to keep his app running when it happens.
The message handling require more work to ensure it is robust enough and that there's no corner case left out.
Fix #1059