now that menu's no longer take focus from their parent, clicking the non-client area of the parent no longer closed the menu. fixed.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1609 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
c16016e9fa
commit
7ae2b6eee1
@ -983,6 +983,20 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
|
|||||||
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
|
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_NCLBUTTONDOWN:
|
||||||
|
case WM_NCMBUTTONDOWN:
|
||||||
|
case WM_NCRBUTTONDOWN:
|
||||||
|
{
|
||||||
|
SFG_Menu *menu;
|
||||||
|
if (fgStructure.Menus.First && (menu = fgGetActiveMenu()))
|
||||||
|
/* user clicked non-client area of window while a menu is open. Close menu */
|
||||||
|
fgDeactivateMenu(menu->ParentWindow);
|
||||||
|
|
||||||
|
/* and always pass to DefWindowProc */
|
||||||
|
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
case WM_ACTIVATE:
|
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)); */
|
||||||
|
Reference in New Issue
Block a user