mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
Make windows resizable if we're about to maximize them programmatically
This commit is contained in:
@@ -2473,11 +2473,17 @@ SDL_AppResult SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const
|
||||
SDL_Window *window = SDL_GetWindowFromEvent(event);
|
||||
if (window) {
|
||||
SDL_WindowFlags flags = SDL_GetWindowFlags(window);
|
||||
if (!(flags & SDL_WINDOW_RESIZABLE)) {
|
||||
SDL_SetWindowResizable(window, true);
|
||||
}
|
||||
if (flags & SDL_WINDOW_MAXIMIZED) {
|
||||
SDL_RestoreWindow(window);
|
||||
} else {
|
||||
SDL_MaximizeWindow(window);
|
||||
}
|
||||
if (!(flags & SDL_WINDOW_RESIZABLE)) {
|
||||
SDL_SetWindowResizable(window, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (withShift) {
|
||||
|
Reference in New Issue
Block a user