From 9245c930440c2ce5c44a997790655cf707188861 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 15 Mar 2014 16:27:06 -0700 Subject: [PATCH] Only show the window if it's supposed to be shown. --- src/video/cocoa/SDL_cocoawindow.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 21f26975f..a55ab4967 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -613,7 +613,10 @@ SetWindowStyle(SDL_Window * window, unsigned int style) window->h = 0; [self windowDidResize:aNotification]; - Cocoa_ShowWindow(SDL_GetVideoDevice(), window); + /* FIXME: Why does the window get hidden? */ + if (window->flags & SDL_WINDOW_SHOWN) { + Cocoa_ShowWindow(SDL_GetVideoDevice(), window); + } } }