From 4b603abfd7977fe83e40caf8c4acb2db6e33762a Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 14 Oct 2013 08:56:55 -0700 Subject: [PATCH] For some reason, trying to raise the window programmatically while it's alt-tabbed away will minimize it. Added a workaround for this. --- src/video/windows/SDL_windowswindow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c index 07b873f7f79af..0c5e5bbed0115 100644 --- a/src/video/windows/SDL_windowswindow.c +++ b/src/video/windows/SDL_windowswindow.c @@ -403,6 +403,9 @@ 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