Common debounced resize logic - #711
Conversation
|
Hmm. I thought a rebuild of my dev environment would be sufficient to update any dependancies. But I get this error when running the "Run Me" command: This was to a clean location (ie not over the top of an existing environment). Am I doing something wrong? |
Is there a packages folder in your build dir? If so, there might be old packages in there. Try deleting them all and running again. |
|
OK, I redid everything (downloaded source and rebuild dev environment). Pulled this PR and built successfully (hooray!) and and confirm the 5 second delay is gone when switching between full screen and windowed (hooray x 2!) |
|
I cannot work on this for the next two weeks. Hope you find someone to check on Linux/Ubuntu/... |
Phew! Hopefully this doesn't break anything on Linux. Thanks for testing. |
|
@phkb While waiting for someone on Linux to test (@LW-archlinux mentioned he would), would you be able to try https://github.com/mcarans/oolite/tree/linux_splash_borderless (which built these packages https://github.com/mcarans/oolite/actions/runs/31456168333)? That is basically this PR + a Linux fix to make the splash screen borderless (and then change the window to resizable for the main window) that does touch code on the Windows path namely the SDL3 window creation flags: |
The game starts OK, but the main window in now borderless, and pressing F12 to make it full screen just moves the window to the top left corner of the screen. The window size remains unchanged.
|
I booted into Windows and was able to replicate that problem. I have fixed it on that branch https://github.com/mcarans/oolite/tree/linux_splash_borderless. The same setting of resizable after splash end was needed as for Linux (I had made it Linux only) + I had to add setting the window bordered (for some reason Linux didn't need that but it shouldn't harm to be explicit about it there too). Packages are here if you nee them: https://github.com/mcarans/oolite/actions/runs/31865603711 Please can you confirm it fixes it for you too. |
I can confirm the border issue is fixed, and it flicks between full-screen and windowed instantly. |
Super! Thanks for testing. I just checked that branch on Linux again to make sure and it's fine, so once @LW-archlinux confirms this PR is ok and I merge it, I'll make a new PR with the changes in that branch. |
|
I've found no negative side effects with this PR (tested in several hours of play/combat) and feel it slightly improves resizing on my system. Tested-by: @LW-archlinux aka Lone_Wolf |
Thanks for testing! |


Common debounced resize logic that doesn't call SDL_SetWindowSize
@oocube This should behave broadly the same as/marginally better than current master for you on Linux.
@phkb This should not cause the 5 second delay you have seen as I think it was something in the initialiseGLWithSize refactor in the Windows sdl3 cleanup draft PR that did that. This is one part of both that PR and the Gnome resize fix draft PR.
Note that I had to refresh the MSYS2 Windows dependencies: https://github.com/OoliteProject/oolite_windeps_build/releases/tag/0.1.5