Author: jimtabor
Date: Wed Aug 31 17:59:41 2016
New Revision: 72522
URL:
http://svn.reactos.org/svn/reactos?rev=72522&view=rev
Log:
[NtUser]
- Fix test results for msg:msg_queue:test_broadcast.
Modified:
trunk/reactos/win32ss/user/ntuser/message.c
Modified: trunk/reactos/win32ss/user/ntuser/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/messag…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/message.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/message.c [iso-8859-1] Wed Aug 31 17:59:41 2016
@@ -554,6 +554,11 @@
}
}
+static BOOL is_message_broadcastable(UINT msg)
+{
+ return msg < WM_USER || msg >= 0xc000;
+}
+
UINT FASTCALL
GetWakeMask(UINT first, UINT last )
{
@@ -1200,11 +1205,13 @@
return FALSE;
}
- if (Wnd == HWND_BROADCAST)
+ if (Wnd == HWND_BROADCAST || Wnd == HWND_TOPMOST)
{
HWND *List;
PWND DesktopWindow;
ULONG i;
+
+ if (!is_message_broadcastable(Msg)) return TRUE;
DesktopWindow = UserGetDesktopWindow();
List = IntWinListChildren(DesktopWindow);
@@ -1495,6 +1502,8 @@
return co_IntSendMessageTimeoutSingle(hWnd, Msg, wParam, lParam, uFlags,
uTimeout, uResult);
}
+ if (!is_message_broadcastable(Msg)) return TRUE;
+
DesktopWindow = UserGetDesktopWindow();
if (NULL == DesktopWindow)
{
@@ -1516,26 +1525,14 @@
for (Child = Children; NULL != *Child; Child++)
{
- if (hWnd == HWND_TOPMOST)
- {
- DesktopWindow = UserGetWindowObject(*Child);
- if (DesktopWindow && DesktopWindow->ExStyle & WS_EX_TOPMOST)
- {
- ERR("HWND_TOPMOST Found\n");
- co_IntSendMessageTimeoutSingle(*Child, Msg, wParam, lParam, uFlags,
uTimeout, uResult);
- }
- }
- else
- {
- PWND pwnd = UserGetWindowObject(*Child);
- if (!pwnd) continue;
-
- if ( pwnd->fnid == FNID_MENU ||
- pwnd->pcls->atomClassName == gpsi->atomSysClass[ICLS_SWITCH] )
- continue;
-
- co_IntSendMessageTimeoutSingle(*Child, Msg, wParam, lParam, uFlags, uTimeout,
uResult);
- }
+ PWND pwnd = UserGetWindowObject(*Child);
+ if (!pwnd) continue;
+
+ if ( pwnd->fnid == FNID_MENU ||
+ pwnd->pcls->atomClassName == gpsi->atomSysClass[ICLS_SWITCH] )
+ continue;
+
+ co_IntSendMessageTimeoutSingle(*Child, Msg, wParam, lParam, uFlags, uTimeout,
uResult);
}
ExFreePoolWithTag(Children, USERTAG_WINDOWLIST);