callign entryfunc should not steal the current window, so save before calling and...
authorDiederick Niehorster <dcnieho@gmail.com>
Mon, 4 Mar 2013 09:25:15 +0000 (09:25 +0000)
committerDiederick Niehorster <dcnieho@gmail.com>
Mon, 4 Mar 2013 09:25:15 +0000 (09:25 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1549 7f0cb862-5218-0410-a997-914c9d46530a

src/mswin/fg_main_mswin.c

index d962153..1e14b2a 100644 (file)
@@ -601,7 +601,9 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
                  */
                 if (FETCH_WCB( *window, Entry ))
                 {
+                    SFG_Window* saved_window = fgStructure.CurrentWindow;
                     INVOKE_WCB( *window, Entry, ( GLUT_ENTERED ) );
+                    fgSetWindow(saved_window);
 
                     tme.cbSize = sizeof(TRACKMOUSEEVENT);
                     tme.dwFlags = TME_LEAVE;