From 3d1b35d8992aa26086fa30597e58d171ddf3eeae Mon Sep 17 00:00:00 2001 From: Diederick Niehorster Date: Mon, 4 Mar 2013 09:25:15 +0000 Subject: [PATCH] callign entryfunc should not steal the current window, so save before calling and restore after callback returns 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mswin/fg_main_mswin.c b/src/mswin/fg_main_mswin.c index d962153..1e14b2a 100644 --- a/src/mswin/fg_main_mswin.c +++ b/src/mswin/fg_main_mswin.c @@ -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; -- 1.7.10.4