Jeff Smith : user32: Only child windows should not receive broadcast messages.
Alexandre Julliard
julliard at winehq.org
Tue Nov 17 15:04:08 CST 2020
Module: wine
Branch: master
Commit: ab1a97926811f91760d699a5f98b25febdfbf8eb
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ab1a97926811f91760d699a5f98b25febdfbf8eb
Author: Jeff Smith <whydoubt at gmail.com>
Date: Mon Nov 16 08:45:31 2020 -0600
user32: Only child windows should not receive broadcast messages.
Signed-off-by: Jeff Smith <whydoubt at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/message.c | 3 ++-
dlls/user32/tests/msg.c | 5 +----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 4434f4b0c2a..d8ebbfd32e3 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -552,7 +552,8 @@ LRESULT WINAPI MessageWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lP
static BOOL CALLBACK broadcast_message_callback( HWND hwnd, LPARAM lparam )
{
struct send_message_info *info = (struct send_message_info *)lparam;
- if (!(GetWindowLongW( hwnd, GWL_STYLE ) & (WS_POPUP|WS_CAPTION))) return TRUE;
+ if ((GetWindowLongW( hwnd, GWL_STYLE ) & (WS_POPUP|WS_CHILD)) == WS_CHILD)
+ return TRUE;
switch(info->type)
{
case MSG_UNICODE:
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index f6802fe3bdd..2ce2b3c6e54 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -16002,10 +16002,9 @@ static void test_broadcast(void)
{
LONG style;
BOOL receive;
- BOOL todo;
} bcast_expect[] =
{
- {WS_OVERLAPPED, TRUE, TRUE},
+ {WS_OVERLAPPED, TRUE},
{WS_OVERLAPPED|WS_DLGFRAME, TRUE},
{WS_OVERLAPPED|WS_BORDER, TRUE},
{WS_OVERLAPPED|WS_CAPTION, TRUE},
@@ -16096,7 +16095,6 @@ static void test_broadcast(void)
for (j = 0; j < ARRAY_SIZE(bcast_expect); j++)
{
wparam_expected = (msg_expected && bcast_expect[j].receive) ? 0xbaadbeef : 0xdead;
- todo_wine_if (msg_expected && bcast_expect[j].todo)
ok(g_broadcast_sub_wparam[j] == wparam_expected,
"%d,%d: message %04x, got %#lx, error %d\n", i, j, messages[i],
g_broadcast_sub_wparam[j], GetLastError());
@@ -16118,7 +16116,6 @@ static void test_broadcast(void)
for (j = 0; j < ARRAY_SIZE(bcast_expect); j++)
{
wparam_expected = (msg_expected && bcast_expect[j].receive) ? 0xbaadbeef : 0xdead;
- todo_wine_if (msg_expected && bcast_expect[j].todo)
ok(g_broadcast_sub_wparam[j] == wparam_expected,
"%d,%d: message %04x, got %#lx, error %d\n", i, j, messages[i],
g_broadcast_sub_wparam[j], GetLastError());
More information about the wine-cvs
mailing list