Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
43197e66
Commit
43197e66
authored
Dec 30, 2015
by
Qian Hong
Committed by
Alexandre Julliard
Dec 30, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Properly handle WM_DEVICECHANGE in is_pointer_message().
Signed-off-by:
Qian Hong
<
qhong@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
39b7c069
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
message.c
dlls/user32/message.c
+8
-7
msg.c
dlls/user32/tests/msg.c
+5
-7
No files found.
dlls/user32/message.c
View file @
43197e66
...
...
@@ -422,9 +422,10 @@ static const unsigned int message_unicode_flags[] =
};
/* check whether a given message type includes pointers */
static
inline
BOOL
is_pointer_message
(
UINT
message
)
static
inline
BOOL
is_pointer_message
(
UINT
message
,
WPARAM
wparam
)
{
if
(
message
>=
8
*
sizeof
(
message_pointer_flags
))
return
FALSE
;
if
(
message
==
WM_DEVICECHANGE
&&
!
(
wparam
&
0x8000
))
return
FALSE
;
return
(
message_pointer_flags
[
message
/
32
]
&
SET
(
message
))
!=
0
;
}
...
...
@@ -3490,7 +3491,7 @@ BOOL WINAPI SendNotifyMessageA( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara
{
struct
send_message_info
info
;
if
(
is_pointer_message
(
msg
))
if
(
is_pointer_message
(
msg
,
wparam
))
{
SetLastError
(
ERROR_MESSAGE_SYNC_ONLY
);
return
FALSE
;
...
...
@@ -3515,7 +3516,7 @@ BOOL WINAPI SendNotifyMessageW( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara
{
struct
send_message_info
info
;
if
(
is_pointer_message
(
msg
))
if
(
is_pointer_message
(
msg
,
wparam
))
{
SetLastError
(
ERROR_MESSAGE_SYNC_ONLY
);
return
FALSE
;
...
...
@@ -3540,7 +3541,7 @@ BOOL WINAPI SendMessageCallbackA( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa
{
struct
send_message_info
info
;
if
(
is_pointer_message
(
msg
))
if
(
is_pointer_message
(
msg
,
wparam
))
{
SetLastError
(
ERROR_MESSAGE_SYNC_ONLY
);
return
FALSE
;
...
...
@@ -3568,7 +3569,7 @@ BOOL WINAPI SendMessageCallbackW( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa
{
struct
send_message_info
info
;
if
(
is_pointer_message
(
msg
))
if
(
is_pointer_message
(
msg
,
wparam
))
{
SetLastError
(
ERROR_MESSAGE_SYNC_ONLY
);
return
FALSE
;
...
...
@@ -3638,7 +3639,7 @@ BOOL WINAPI PostMessageW( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
struct
send_message_info
info
;
if
(
is_pointer_message
(
msg
))
if
(
is_pointer_message
(
msg
,
wparam
))
{
SetLastError
(
ERROR_MESSAGE_SYNC_ONLY
);
return
FALSE
;
...
...
@@ -3687,7 +3688,7 @@ BOOL WINAPI PostThreadMessageW( DWORD thread, UINT msg, WPARAM wparam, LPARAM lp
{
struct
send_message_info
info
;
if
(
is_pointer_message
(
msg
))
if
(
is_pointer_message
(
msg
,
wparam
))
{
SetLastError
(
ERROR_MESSAGE_SYNC_ONLY
);
return
FALSE
;
...
...
dlls/user32/tests/msg.c
View file @
43197e66
...
...
@@ -4553,13 +4553,11 @@ static void test_WM_DEVICECHANGE(HWND hwnd)
}
else
{
todo_wine
{
ret
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
0
,
QS_POSTMESSAGE
);
ok
(
ret
==
WAIT_OBJECT_0
,
"MsgWaitForMultipleObjects returned %x
\n
"
,
ret
);
memset
(
&
msg
,
0
,
sizeof
(
msg
));
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"PeekMessage should succeed
\n
"
);
ok
(
msg
.
message
==
WM_DEVICECHANGE
,
"got %04x instead of WM_DEVICECHANGE
\n
"
,
msg
.
message
);
}
ret
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
0
,
QS_POSTMESSAGE
);
ok
(
ret
==
WAIT_OBJECT_0
,
"MsgWaitForMultipleObjects returned %x
\n
"
,
ret
);
memset
(
&
msg
,
0
,
sizeof
(
msg
));
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"PeekMessage should succeed
\n
"
);
ok
(
msg
.
message
==
WM_DEVICECHANGE
,
"got %04x instead of WM_DEVICECHANGE
\n
"
,
msg
.
message
);
}
}
}
...
...
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