DWORD OldStyleEx; /* window Ex style - stored before the window is made fullscreen */
BOOL OldMaximized; /* window maximized state - stored before the window is made fullscreen */
- GLboolean MouseTracking; /* Needed for generating GLUT_ENTERED and GLUT_LEFT entry func callbacks on windows */
+ BOOL MouseTracking; /* Needed for generating GLUT_ENTERED and GLUT_LEFT entry func callbacks on windows */
/* Need to store window titles to emulate
* glutSetIconTitle/glutSetWindowTitle as Windows has only
fgPlatformCheckMenuDeactivate();
break;
+ case WM_MOUSEACTIVATE:
+ /* Clicks should not activate the menu.
+ * Especially important when clicking on a menu's submenu item which has no effect.
+ */
+ printf("WM_MOUSEACTIVATE\n");
+ if (window->IsMenu)
+ lRet = MA_NOACTIVATEANDEAT;
+ else
+ lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
+ break;
+
#if 0
case WM_ACTIVATE:
- //printf("WM_ACTIVATE: %x (ID: %i) %d %d\n",lParam, window->ID, HIWORD(wParam), LOWORD(wParam));
+ /* printf("WM_ACTIVATE: %x (ID: %i) %d %d\n",lParam, window->ID, HIWORD(wParam), LOWORD(wParam)); */
if (LOWORD(wParam) != WA_INACTIVE)
{
/* printf("WM_ACTIVATE: fgSetCursor( %p, %d)\n", window,
tme.hwndTrack = window->Window.Handle;
TrackMouseEvent(&tme);
- window->State.pWState.MouseTracking = GL_TRUE;
+ window->State.pWState.MouseTracking = TRUE;
}
}
}
INVOKE_WCB( *window, Entry, ( GLUT_LEFT ) );
fgSetWindow(saved_window);
- window->State.pWState.MouseTracking = GL_FALSE;
+ window->State.pWState.MouseTracking = FALSE;
lRet = 0; /* As per docs, must return zero */
}
break;