X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffg_main_mswin.c;h=1958755e254f1c090479700284c680066767266e;hb=63922c1586329f2ed481453aa9175ecc7b235adb;hp=97b83631c53a4fda609d60ca481e5f766e2db3a3;hpb=cae6701c343e3a42bc9504f14e6d83e4ca9d8119;p=freeglut diff --git a/src/mswin/fg_main_mswin.c b/src/mswin/fg_main_mswin.c index 97b8363..1958755 100644 --- a/src/mswin/fg_main_mswin.c +++ b/src/mswin/fg_main_mswin.c @@ -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 */ @@ -1543,16 +1543,16 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR break; } #endif - //Added by Jinrong Xie (stonexjr@gmail.com) 12/24/2014 - //for SpaceNavigator support on Windows. - /* - case WM_ACTIVATEAPP: - fgInitialiseSpaceball(); - break; - */ + +#ifdef WM_INPUT case WM_INPUT: - fgSpaceballHandleWinEvent(hWnd, wParam, lParam); + /* Added by Jinrong Xie for SpaceNavigator support on Windows. Dec 2014 */ + if (fgHasSpaceball()) + { + fgSpaceballHandleWinEvent(hWnd, wParam, lParam); + } break; +#endif default: /* Handle unhandled messages */ lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );