Open learn-more opened 7 months ago
We are scoping work for the SDL 3.2.0 release, so please let us know if this is a showstopper for you.
We are scoping work for the SDL 3.2.0 release, so please let us know if this is a showstopper for you.
I'll consider sticking on 2.x or moving to another library for this.
It looks like you've already investigated this and added a workaround. Can you turn that into a tested PR for SDL 3.2?
It looks like you've already investigated this and added a workaround. Can you turn that into a tested PR for SDL 3.2?
I'll have a go at it.
Thanks!
I created a pr with the testcase, could you please check that it follows the style required? I am not very familiar with sdl testcases, so I tried to copy the style of other tests.
The actual fix is not implemented yet, so the test fails for now.
I added a couple of comments, but that generally looks fine. Feel free to add the fix as a second commit on that PR.
I added a couple of comments, but that generally looks fine. Feel free to add the fix as a second commit on that PR.
The fix has been added. I also wanted to test the other types of dialogs, but the task dialog that is normally used as dialogbox is spawned from a thread, which is incompatible with the hooking method I used. There are 4 options that I see to mitigate this:
Which would be the preferred method?
On Windows, when starting a process, there are options that can be configured on the initial window. In a shortcut this looks like this:
And when creating a process with
CreateProcess
, it can be specified in thePROCESS_INFORMATION
in the fieldswShowWindow
anddwFlags
.This maximizes a window even if the messagebox is not created maximized. On a normal window (
SDL_CreateWindow
) this does not seem to occur anymore (in SDL3, in SDL2 a normal window was affected as well).Example code that reproduces:
Putty has a workaround for this: https://github.com/KasperDeng/putty/blob/037a4ccb6e731fafc4cc77c0d16f80552fd69dce/putty-src/windows/windlg.c#L662
Should there be something in SDL that works around it, or is that already happening but not triggering for the messagebox?