user32: Only child windows should not receive broadcast messages.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jeff Smith 2020-11-16 08:45:31 -06:00 committed by Alexandre Julliard
parent 81dec8de77
commit ab1a979268
2 changed files with 3 additions and 5 deletions

View file

@ -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:

View file

@ -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());