uMsg, wParam, lParam ); */
/* Some events only sent to main window. Check if the current window that
- * the mouse is over is a child window. Below whn handling some messages,
+ * the mouse is over is a child window. Below when handling some messages,
* we make sure that we process callbacks on the child window instead.
* This mirrors how GLUT does things.
*/
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