From d398aeed300f951a5972d93e231f50ea2bab27c5 Mon Sep 17 00:00:00 2001 From: Diederick Niehorster Date: Mon, 23 Jul 2012 09:51:34 +0000 Subject: [PATCH] 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 --- 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 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 -- 1.7.10.4