Skip to content

Common debounced resize logic - #711

Merged
mcarans merged 2 commits into
OoliteProject:masterfrom
mcarans:master
Aug 15, 2026
Merged

Common debounced resize logic#711
mcarans merged 2 commits into
OoliteProject:masterfrom
mcarans:master

Conversation

@mcarans

@mcarans mcarans commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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

@phkb

phkb commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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:

Packages (1) mingw-w64-ucrt-x86_64-lld-22.1.8-2

Total Download Size:    3.31 MiB
Total Installed Size:  44.90 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 mingw-w64-ucrt-x86_64-lld-22.1.8-2-any        3.3 MiB  2.37 MiB/s 00:01 [#######################################] 100%
(1/1) checking keys in keyring                                           [#######################################] 100%
(1/1) checking package integrity                                         [#######################################] 100%
(1/1) loading package files                                              [#######################################] 100%
(1/1) checking for file conflicts                                        [#######################################] 100%
(1/1) checking available disk space                                      [#######################################] 100%
:: Processing package changes...
(1/1) installing mingw-w64-ucrt-x86_64-lld                               [#######################################] 100%
Installing GNUStep libraries with clang
Installing libobjc2 package
loading packages...
error: 'mingw-w64-ucrt-x86_64-libobjc2_clang-2.3+eb092b2-1-any.pkg.tar.zst': duplicate target
❌ mingw-w64-ucrt-x86_64-libobjc2_clang-2.3+803a2f6-1-any.pkg.tar.zst
mingw-w64-ucrt-x86_64-libobjc2_clang-2.3+eb092b2-1-any.pkg.tar.zst install failed!

This was to a clean location (ie not over the top of an existing environment). Am I doing something wrong?

@mcarans

mcarans commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

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:

Packages (1) mingw-w64-ucrt-x86_64-lld-22.1.8-2

Total Download Size:    3.31 MiB
Total Installed Size:  44.90 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 mingw-w64-ucrt-x86_64-lld-22.1.8-2-any        3.3 MiB  2.37 MiB/s 00:01 [#######################################] 100%
(1/1) checking keys in keyring                                           [#######################################] 100%
(1/1) checking package integrity                                         [#######################################] 100%
(1/1) loading package files                                              [#######################################] 100%
(1/1) checking for file conflicts                                        [#######################################] 100%
(1/1) checking available disk space                                      [#######################################] 100%
:: Processing package changes...
(1/1) installing mingw-w64-ucrt-x86_64-lld                               [#######################################] 100%
Installing GNUStep libraries with clang
Installing libobjc2 package
loading packages...
error: 'mingw-w64-ucrt-x86_64-libobjc2_clang-2.3+eb092b2-1-any.pkg.tar.zst': duplicate target
❌ mingw-w64-ucrt-x86_64-libobjc2_clang-2.3+803a2f6-1-any.pkg.tar.zst
mingw-w64-ucrt-x86_64-libobjc2_clang-2.3+eb092b2-1-any.pkg.tar.zst install failed!

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.

@phkb

phkb commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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!)

@oocube

oocube commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

I cannot work on this for the next two weeks. Hope you find someone to check on Linux/Ubuntu/...

@mcarans

mcarans commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

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!)

Phew! Hopefully this doesn't break anything on Linux. Thanks for testing.

@mcarans

mcarans commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

@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: Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS | SDL_WINDOW_HIGH_PIXEL_DENSITY; I doubt it would cause a 5 second delay.

@phkb

phkb commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

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)?

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.

image image

@mcarans

mcarans commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

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)?

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.

@phkb

phkb commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

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.

@mcarans

mcarans commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

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.

@LW-archlinux

Copy link
Copy Markdown

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

@mcarans

mcarans commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

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!

@mcarans
mcarans merged commit caea422 into OoliteProject:master Aug 15, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants