-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 testcase showing wShowWindow behavior in Windows #11129
base: main
Are you sure you want to change the base?
Conversation
/* The child process exits with code '1' when the window is minimized / maximized */ | ||
DWORD exit_code = 0; | ||
GetExitCodeProcess(pi.hProcess, &exit_code); | ||
SDLTest_AssertCheck(exit_code == 0, "Child process failed with code %d!", exit_code); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SDLTest_AssertCheck(exit_code == 0, "Child process failed with code %d!", exit_code); | |
SDLTest_AssertCheck(exit_code == 0, "Child process failed with code %lu", exit_code); |
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. */ |
There was a problem hiding this comment.
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.
} | ||
|
||
if (consumed <= 0) { | ||
static const char *options[] = { NULL }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it shows in --help
.
static const char *options[] = { NULL }; | |
static const char *options[] = { "--child-spawn-dialog", NULL }; |
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.