https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0bab3a1048c7aba13e365…
commit 0bab3a1048c7aba13e36540e6f8fc400835cc1a6
Author: Roy Tam <roytam(a)gmail.com>
AuthorDate: Sat Jan 21 11:42:48 2023 +0800
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Sun Jan 22 22:18:11 2023 +0300
[NTUSER][USER32] Set WM_CONTEXTMENU's wParam to the child window's handle
Cherry-picked from
https://github.com/wine-mirror/wine/commit/3af8415ca9dc50e6c394c1001aad97db…
CORE-18801
---
win32ss/user/ntuser/defwnd.c | 2 +-
win32ss/user/user32/windows/defwnd.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/win32ss/user/ntuser/defwnd.c b/win32ss/user/ntuser/defwnd.c
index 27929de7dbe..0faadbce3f9 100644
--- a/win32ss/user/ntuser/defwnd.c
+++ b/win32ss/user/ntuser/defwnd.c
@@ -738,7 +738,7 @@ IntDefWindowProc(
{
if (Wnd->style & WS_CHILD)
{
- co_IntSendMessage(UserHMGetHandle(IntGetParent(Wnd)), Msg, wParam,
lParam);
+ co_IntSendMessage(UserHMGetHandle(IntGetParent(Wnd)), Msg,
(WPARAM)UserHMGetHandle(Wnd), lParam);
}
else
{
diff --git a/win32ss/user/user32/windows/defwnd.c b/win32ss/user/user32/windows/defwnd.c
index 2433178a49f..0a976bf50ee 100644
--- a/win32ss/user/user32/windows/defwnd.c
+++ b/win32ss/user/user32/windows/defwnd.c
@@ -390,11 +390,11 @@ User32DefWindowProc(HWND hWnd,
{
if (bUnicode)
{
- SendMessageW(GetParent(hWnd), Msg, wParam, lParam);
+ SendMessageW(GetParent(hWnd), Msg, (WPARAM)hWnd, lParam);
}
else
{
- SendMessageA(GetParent(hWnd), WM_CONTEXTMENU, wParam, lParam);
+ SendMessageA(GetParent(hWnd), Msg, (WPARAM)hWnd, lParam);
}
}
else