Module: wine Branch: master Commit: d275253f5db5532f4778ae14344fe28ab2b88c54 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d275253f5db5532f4778ae143...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Apr 20 15:56:50 2022 +0200
win32u: Move NtUserSetMenuContextHelpId implementation from user32.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/user32/menu.c | 19 ------------------- dlls/user32/user32.spec | 2 +- dlls/win32u/menu.c | 15 +++++++++++++++ dlls/win32u/syscall.c | 1 + dlls/win32u/win32u.spec | 2 +- dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 8 ++++++++ include/ntuser.h | 1 + 8 files changed, 28 insertions(+), 21 deletions(-)
diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index b1fdacefc9c..8df665c9132 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -5255,25 +5255,6 @@ BOOL WINAPI GetMenuInfo (HMENU hMenu, LPMENUINFO lpmi) }
-/********************************************************************** - * SetMenuContextHelpId (USER32.@) - */ -BOOL WINAPI SetMenuContextHelpId( HMENU hMenu, DWORD dwContextHelpID) -{ - POPUPMENU *menu; - - TRACE("(%p 0x%08x)\n", hMenu, dwContextHelpID); - - if ((menu = grab_menu_ptr(hMenu))) - { - menu->dwContextHelpID = dwContextHelpID; - release_menu_ptr(menu); - return TRUE; - } - return FALSE; -} - - /********************************************************************** * GetMenuContextHelpId (USER32.@) */ diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 783684e8cc7..8af07c49e98 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -679,7 +679,7 @@ @ stdcall SetLayeredWindowAttributes(ptr long long long) NtUserSetLayeredWindowAttributes @ stdcall SetLogonNotifyWindow(long long) @ stdcall SetMenu(long long) -@ stdcall SetMenuContextHelpId(long long) +@ stdcall SetMenuContextHelpId(long long) NtUserSetMenuContextHelpId @ stdcall SetMenuDefaultItem(long long long) @ stdcall SetMenuInfo(long ptr) @ stdcall SetMenuItemBitmaps(long long long long long) diff --git a/dlls/win32u/menu.c b/dlls/win32u/menu.c index b107bd7e8e0..fcb6b83b2e8 100644 --- a/dlls/win32u/menu.c +++ b/dlls/win32u/menu.c @@ -347,3 +347,18 @@ BOOL draw_menu_bar( HWND hwnd ) return NtUserSetWindowPos( hwnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED ); } + +/********************************************************************** + * NtUserSetMenuContextHelpId (win32u.@) + */ +BOOL WINAPI NtUserSetMenuContextHelpId( HMENU handle, DWORD id ) +{ + POPUPMENU *menu; + + TRACE( "(%p 0x%08x)\n", handle, id ); + + if (!(menu = grab_menu_ptr( handle ))) return FALSE; + menu->dwContextHelpID = id; + release_menu_ptr( menu ); + return TRUE; +} diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index f88b8fa30da..18204a34379 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -155,6 +155,7 @@ static void * const syscalls[] = NtUserRemoveClipboardFormatListener, NtUserRemoveProp, NtUserSetKeyboardState, + NtUserSetMenuContextHelpId, NtUserSetObjectInformation, NtUserSetProcessDpiAwarenessContext, NtUserSetProcessWindowStation, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 98bfbb33a2d..4acb1dae455 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1207,7 +1207,7 @@ @ stub NtUserSetMagnificationDesktopMagnifierOffsetsDWMUpdated @ stub NtUserSetManipulationInputTarget @ stub NtUserSetMenu -@ stub NtUserSetMenuContextHelpId +@ stdcall -syscall NtUserSetMenuContextHelpId(long long) @ stub NtUserSetMenuDefaultItem @ stub NtUserSetMenuFlagRtoL @ stub NtUserSetMirrorRendering diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index c1d41c2be43..fe1b2a2e2e1 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -142,6 +142,7 @@ SYSCALL_ENTRY( NtUserRemoveClipboardFormatListener ) \ SYSCALL_ENTRY( NtUserRemoveProp ) \ SYSCALL_ENTRY( NtUserSetKeyboardState ) \ + SYSCALL_ENTRY( NtUserSetMenuContextHelpId ) \ SYSCALL_ENTRY( NtUserSetObjectInformation ) \ SYSCALL_ENTRY( NtUserSetProcessDpiAwarenessContext ) \ SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index d916680660a..08c65e8a3df 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -641,3 +641,11 @@ NTSTATUS WINAPI wow64_NtUserCheckMenuItem( UINT *args )
return NtUserCheckMenuItem( handle, id, flags ); } + +NTSTATUS WINAPI wow64_NtUserSetMenuContextHelpId( UINT *args ) +{ + HMENU menu = get_handle( &args ); + DWORD id = get_ulong( &args ); + + return NtUserSetMenuContextHelpId( menu, id ); +} diff --git a/include/ntuser.h b/include/ntuser.h index 879eed4bf79..7084dec19eb 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -553,6 +553,7 @@ BOOL WINAPI NtUserSetCursorPos( INT x, INT y ); HWND WINAPI NtUserSetFocus( HWND hwnd ); BOOL WINAPI NtUserSetKeyboardState( BYTE *state ); BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags ); +BOOL WINAPI NtUserSetMenuContextHelpId( HMENU handle, DWORD id ); HWND WINAPI NtUserSetParent( HWND hwnd, HWND parent ); BOOL WINAPI NtUserSetProcessDpiAwarenessContext( ULONG awareness, ULONG unknown ); BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );