[PATCH 2/3] user32: Send WM_COMMAND to parent window, not parent control.
Alex Henrie
alexhenrie24 at gmail.com
Mon Oct 12 02:30:50 CDT 2015
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
dlls/user32/button.c | 2 +-
dlls/user32/tests/msg.c | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/user32/button.c b/dlls/user32/button.c
index 9a10b86..5e7e7f0 100644
--- a/dlls/user32/button.c
+++ b/dlls/user32/button.c
@@ -94,7 +94,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(button);
#define BUTTON_NOTIFY_PARENT(hWnd, code) \
do { /* Notify parent which has created this button control */ \
TRACE("notification " #code " sent to hwnd=%p\n", GetParent(hWnd)); \
- SendMessageW(GetParent(hWnd), WM_COMMAND, \
+ SendMessageW(GetAncestor(hWnd, GA_PARENT), WM_COMMAND, \
MAKEWPARAM(GetWindowLongPtrW((hWnd),GWLP_ID), (code)), \
(LPARAM)(hWnd)); \
} while(0)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index fcb231c..c46678a 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -5324,7 +5324,6 @@ static const struct message WmLButtonUpSeq[] =
{ EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 },
{ WM_DRAWITEM, sent|parent|optional }, /* FIXME: Wine sends it */
- { WM_COMMAND, sent|parent|optional }, /* FIXME: Wine sends it */
{ WM_CAPTURECHANGED, sent|wparam|defwinproc, 0 },
{ 0 }
};
@@ -5336,7 +5335,6 @@ static const struct message WmLButtonUpStaticSeq[] =
{ WM_DRAWITEM, sent|parent|optional }, /* FIXME: Wine sends it */
{ EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 },
- { WM_COMMAND, sent|parent|optional }, /* FIXME: Wine sends it */
{ WM_CAPTURECHANGED, sent|wparam|defwinproc, 0 },
{ 0 }
};
@@ -5350,7 +5348,6 @@ static const struct message WmLButtonUpAutoSeq[] =
{ EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 },
{ BM_SETCHECK, sent|defwinproc },
{ WM_CTLCOLORSTATIC, sent|parent, 0, 0 },
- { WM_COMMAND, sent|parent|optional }, /* FIXME: Wine sends it */
{ WM_CAPTURECHANGED, sent|wparam|defwinproc, 0 },
{ 0 }
};
--
2.6.1
More information about the wine-patches
mailing list