Disabled catching of mouse move events when not over menu.
Changed MENU_SelectItem allow EndMenu to deselect the selected menu.
diff --git a/controls/menu.c b/controls/menu.c
index d867cdc..2b17437 100644
--- a/controls/menu.c
+++ b/controls/menu.c
@@ -1665,6 +1665,7 @@
if (lppop->FocusedItem == wIndex) return;
if (lppop->wFlags & MF_POPUP) hdc = GetDC( lppop->hWnd );
else hdc = GetDCEx( lppop->hWnd, 0, DCX_CACHE | DCX_WINDOW);
+ if (!top_popup) top_popup = lppop->hWnd;
SelectObject( hdc, hMenuFont);
@@ -2788,9 +2789,9 @@
/* In win95 winelook, the selected menu item must be changed every time the
mouse moves. In Win31 winelook, the mouse button has to be held down */
- if ( (TWEAK_WineLook > WIN31_LOOK) ||
+ if ( hmenu && ((TWEAK_WineLook > WIN31_LOOK) ||
( (msg.wParam & MK_LBUTTON) ||
- ((wFlags & TPM_RIGHTBUTTON) && (msg.wParam & MK_RBUTTON))) )
+ ((wFlags & TPM_RIGHTBUTTON) && (msg.wParam & MK_RBUTTON)))) )
fEndMenu |= !MENU_MouseMove( &mt, hmenu, wFlags );