From 976c87692401e12a6eec77e95aae77ee985302cc Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 8 Nov 2013 14:05:23 -0800 Subject: [PATCH] Fixed bug 2172 - Window loses maximized state when activated I still haven't figured out why my application is being minimized when I try to raise, it but my previous workaround is causing issues. For now the correct way to raise and/or restore the window is as follows: if ( !(SDL_GetWindowFlags( window ) & SDL_WINDOW_MINIMIZED) ) { SDL_RaiseWindow( window ); } if ( SDL_GetWindowFlags( window ) & SDL_WINDOW_MINIMIZED ) { SDL_RestoreWindow( window ); } I will investigate the window state change rules more fully in the future. CR: Alfred Reynolds --- src/video/windows/SDL_windowswindow.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c index cd53975d1..1a6849d26 100644 --- a/src/video/windows/SDL_windowswindow.c +++ b/src/video/windows/SDL_windowswindow.c @@ -405,9 +405,6 @@ void WIN_RaiseWindow(_THIS, SDL_Window * window) { WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOSIZE); - - /* Raising the window while alt-tabbed can cause it to be minimized for some reason? */ - WIN_RestoreWindow(_this, window); } void