Author: jimtabor Date: Thu Jul 20 20:26:14 2017 New Revision: 75382
URL: http://svn.reactos.org/svn/reactos?rev=75382&view=rev Log: [NtUser] - Patch by Huw Davies : Explicitly set last error to ERROR_SUCCESS. - Remove hack and added a note.
Modified: trunk/reactos/win32ss/user/ntuser/menu.c
Modified: trunk/reactos/win32ss/user/ntuser/menu.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.c?... ============================================================================== --- trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] Thu Jul 20 20:26:14 2017 @@ -4158,6 +4158,7 @@ mt.TopMenu->TimeToHide = FALSE; }
+ EngSetLastError( ERROR_SUCCESS ); /* The return value is only used by TrackPopupMenu */ if (!(wFlags & TPM_RETURNCMD)) return TRUE; if (executedMenuId == -1) executedMenuId = 0; @@ -4251,7 +4252,7 @@ */ VOID MENU_TrackMouseMenuBar( PWND pWnd, ULONG ht, POINT pt) { - PMENU pMenu = (ht == HTSYSMENU) ? IntGetSystemMenu(pWnd, FALSE) : IntGetMenu( UserHMGetHandle(pWnd) ); + PMENU pMenu = (ht == HTSYSMENU) ? IntGetSystemMenu(pWnd, FALSE) : IntGetMenu( UserHMGetHandle(pWnd) ); // See 74276 and CORE-12801 UINT wFlags = TPM_BUTTONDOWN | TPM_LEFTALIGN | TPM_LEFTBUTTON;
TRACE("wnd=%p ht=0x%04x (%ld,%ld)\n", pWnd, ht, pt.x, pt.y); @@ -4383,14 +4384,6 @@ MsqSetStateWindow(pti, MSQ_STATE_MENUOWNER, NULL); pti->MessageQueue->QF_flags &= ~QF_CAPTURELOCKED; co_UserSetCapture(NULL); /* release the capture */ - } - - // - // HACK : Until back trace fault in co_IntUpdateWindows and MENU_TrackMenu. - // - if (EngGetLastError() == ERROR_ACCESS_DENIED) - { - EngSetLastError(NO_ERROR); }
MENU_ExitTracking(pWnd, TRUE, wFlags);