Skip to content

Add testcase showing wShowWindow behavior in Windows#11129

Open
learn-more wants to merge 2 commits intolibsdl-org:mainfrom
learn-more:wshowwindow
Open

Add testcase showing wShowWindow behavior in Windows#11129
learn-more wants to merge 2 commits intolibsdl-org:mainfrom
learn-more:wshowwindow

Conversation

@learn-more
Copy link
Copy Markdown

This is a testcase for #9434.
It shows that a process does not control all aspects of the initial window it creates.
(As-is there is no workaround provided yet, so the testcase fails)

Description

The initial window created in a process is influenced by the wShowWindow flag passed in to CreateProcess.:

STARTUPINFOA si = { sizeof(si) };
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_MAXIMIZE;

This is used in the shell to provide the 'Minimized', 'Maximized' etc dropdown on shortcuts.

@learn-more learn-more marked this pull request as ready for review October 8, 2024 20:17
Comment thread test/testcreateprocwndstatew32.c Outdated
Comment thread test/testcreateprocwndstatew32.c Outdated
including commercial applications, and to alter it and redistribute it
freely.
*/
/* Sample program: Test SDL's ability to defuse the window state (minimized/maximized) that is applied on the initial window created. */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note what bug this is a test case for.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the description, is this more along the lines of what you were expecting here?

Comment thread test/testcreateprocwndstatew32.c Outdated
@slouken slouken added this to the 3.6.0 milestone Aug 26, 2025
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.

3 participants