From: Diederick Niehorster Date: Mon, 23 Jul 2012 09:51:34 +0000 (+0000) Subject: now added fix suggested by Ioannis to make menus work when an entryfunc X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=d398aeed300f951a5972d93e231f50ea2bab27c5;p=freeglut now added fix suggested by Ioannis to make menus work when an entryfunc is defined for the window git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1365 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/mswin/fg_main_mswin.c b/src/mswin/fg_main_mswin.c index 663ff3b..7250b3a 100644 --- a/src/mswin/fg_main_mswin.c +++ b/src/mswin/fg_main_mswin.c @@ -518,9 +518,11 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, case WM_KILLFOCUS: { SFG_Menu* menu = NULL; + SFG_Window* saved_window = fgStructure.CurrentWindow; /* printf("WM_KILLFOCUS: %p\n", window ); */ lRet = DefWindowProc( hWnd, uMsg, wParam, lParam ); INVOKE_WCB( *window, Entry, ( GLUT_LEFT ) ); + fgSetWindow(saved_window); /* If we have an open menu, see if the open menu should be closed * when focus was lost because user either switched