From 0026d78ed8bcc9d480a47c9eaff858f185fa15cf Mon Sep 17 00:00:00 2001 From: Rizsanyi Zsolt Date: Thu, 9 May 2002 01:14:35 +0000 Subject: [PATCH] Disabled catching of mouse move events when not over menu. Changed MENU_SelectItem allow EndMenu to deselect the selected menu. --- controls/menu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controls/menu.c b/controls/menu.c index d867cdc486e..2b174372271 100644 --- a/controls/menu.c +++ b/controls/menu.c @@ -1665,6 +1665,7 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex, 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 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y, /* 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 );