Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ad7cb436
Commit
ad7cb436
authored
Apr 07, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Limit broadcast messages to system and registered ones.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d154c842
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
message.c
dlls/user32/message.c
+8
-2
msg.c
dlls/user32/tests/msg.c
+0
-4
No files found.
dlls/user32/message.c
View file @
ad7cb436
...
...
@@ -3232,6 +3232,10 @@ static LRESULT send_inter_thread_callback( HWND hwnd, UINT msg, WPARAM wp, LPARA
return
send_inter_thread_message
(
info
,
result
);
}
static
BOOL
is_message_broadcastable
(
UINT
msg
)
{
return
msg
<
WM_USER
||
msg
>=
0xc000
;
}
/***********************************************************************
* send_message
...
...
@@ -3246,7 +3250,8 @@ static BOOL send_message( struct send_message_info *info, DWORD_PTR *res_ptr, BO
if
(
is_broadcast
(
info
->
hwnd
))
{
EnumWindows
(
broadcast_message_callback
,
(
LPARAM
)
info
);
if
(
is_message_broadcastable
(
info
->
msg
))
EnumWindows
(
broadcast_message_callback
,
(
LPARAM
)
info
);
if
(
res_ptr
)
*
res_ptr
=
1
;
return
TRUE
;
}
...
...
@@ -3659,7 +3664,8 @@ BOOL WINAPI PostMessageW( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
if
(
is_broadcast
(
hwnd
))
{
EnumWindows
(
broadcast_message_callback
,
(
LPARAM
)
&
info
);
if
(
is_message_broadcastable
(
info
.
msg
))
EnumWindows
(
broadcast_message_callback
,
(
LPARAM
)
&
info
);
return
TRUE
;
}
...
...
dlls/user32/tests/msg.c
View file @
ad7cb436
...
...
@@ -14047,7 +14047,6 @@ static void test_broadcast(void)
}
else
{
todo_wine
ok
(
!
ret
,
"%d: message %04x, got %d, error %d
\n
"
,
i
,
messages
[
i
],
ret
,
GetLastError
());
}
...
...
@@ -14064,7 +14063,6 @@ static void test_broadcast(void)
}
else
{
todo_wine
ok
(
!
ret
,
"%d: got %d, error %d
\n
"
,
i
,
ret
,
GetLastError
());
}
...
...
@@ -14082,7 +14080,6 @@ static void test_broadcast(void)
}
else
{
todo_wine
ok
(
g_broadcast_lparam
==
0xdead
,
"%d: message %04x, got %#lx, error %d
\n
"
,
i
,
messages
[
i
],
g_broadcast_lparam
,
GetLastError
());
}
...
...
@@ -14102,7 +14099,6 @@ static void test_broadcast(void)
}
else
{
todo_wine
ok
(
g_broadcast_lparam
==
0xdead
,
"%d: message %04x, got %#lx, error %d
\n
"
,
i
,
messages
[
i
],
g_broadcast_lparam
,
GetLastError
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment