Ensure "maximixed" is taken into account when updating window visibility on WM_SIZE
authorRcmaniac25 <rcmaniac25@hotmail.com>
Sun, 14 May 2017 20:49:46 +0000 (20:49 +0000)
committerDiederick Niehorster <dcnieho@gmail.com>
Sun, 14 May 2017 20:49:46 +0000 (20:49 +0000)
(cherry picked from commit 5b8a164de14fe3de4c67b8348c10e2711f481cd5)

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1800 7f0cb862-5218-0410-a997-914c9d46530a

src/mswin/fg_main_mswin.c

index 20a635b..1958755 100644 (file)
@@ -874,7 +874,7 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
         /* Update visibility state of the window */
         if (wParam==SIZE_MINIMIZED)
             fghPlatformOnWindowStatusNotify(window,GL_FALSE,GL_FALSE);
-        else if (wParam==SIZE_RESTORED && !window->State.Visible)
+        else if ((wParam==SIZE_RESTORED || wParam == SIZE_MAXIMIZED) && !window->State.Visible)
             fghPlatformOnWindowStatusNotify(window,GL_TRUE,GL_FALSE);
 
         /* Check window visible, we don't want do anything when we get a WM_SIZE because the user or glutIconifyWindow minimized the window */