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
8d10b5ce
Commit
8d10b5ce
authored
Jun 05, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Jun 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use the original message's wparam during the double-click comparison.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e60bc27d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
3 deletions
+68
-3
message.c
dlls/user32/message.c
+4
-1
win.c
dlls/user32/tests/win.c
+64
-2
No files found.
dlls/user32/message.c
View file @
8d10b5ce
...
...
@@ -2490,6 +2490,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
GUITHREADINFO
info
;
MOUSEHOOKSTRUCTEX
hook
;
BOOL
eatMsg
;
WPARAM
wparam
;
/* find the window to dispatch this mouse message to */
...
...
@@ -2523,13 +2524,14 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
pt
=
msg
->
pt
;
message
=
msg
->
message
;
wparam
=
msg
->
wParam
;
/* Note: windows has no concept of a non-client wheel message */
if
(
message
!=
WM_MOUSEWHEEL
)
{
if
(
hittest
!=
HTCLIENT
)
{
message
+=
WM_NCMOUSEMOVE
-
WM_MOUSEMOVE
;
msg
->
wP
aram
=
hittest
;
wp
aram
=
hittest
;
}
else
{
...
...
@@ -2581,6 +2583,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
{
if
(
message
<
first
||
message
>
last
)
return
FALSE
;
}
msg
->
wParam
=
wparam
;
/* message is accepted now (but may still get dropped) */
...
...
dlls/user32/tests/win.c
View file @
8d10b5ce
...
...
@@ -3759,7 +3759,7 @@ static void test_mouse_input(HWND hwnd)
RECT
rc
;
POINT
pt
;
int
x
,
y
;
HWND
popup
;
HWND
popup
,
child
=
NULL
;
MSG
msg
;
BOOL
ret
;
LRESULT
res
;
...
...
@@ -3948,10 +3948,72 @@ static void test_mouse_input(HWND hwnd)
TEST_MOUSEACTIVATE
(
HTCLOSE
,
MA_ACTIVATE
);
TEST_MOUSEACTIVATE
(
HTHELP
,
MA_ACTIVATE
);
ShowWindow
(
popup
,
SW_HIDE
);
/* Test sending double click to the non-client area, while capturing the window after
the first click has been processed. Use a child window to ensure that Wine's graphics
driver isn't managing the non-client area. */
GetWindowRect
(
hwnd
,
&
rc
);
child
=
CreateWindowExA
(
0
,
"MainWindowClass"
,
NULL
,
WS_CHILD
|
WS_CAPTION
|
WS_SYSMENU
|
WS_VISIBLE
,
rc
.
left
,
rc
.
top
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
,
hwnd
,
0
,
0
,
NULL
);
GetWindowRect
(
child
,
&
rc
);
UpdateWindow
(
child
);
SetCursorPos
(
rc
.
left
+
5
,
rc
.
top
+
5
);
flush_events
(
TRUE
);
mouse_event
(
MOUSEEVENTF_LEFTDOWN
,
0
,
0
,
0
,
0
);
mouse_event
(
MOUSEEVENTF_LEFTUP
,
0
,
0
,
0
,
0
);
mouse_event
(
MOUSEEVENTF_LEFTDOWN
,
0
,
0
,
0
,
0
);
mouse_event
(
MOUSEEVENTF_LEFTUP
,
0
,
0
,
0
,
0
);
ret
=
wait_for_message
(
&
msg
);
ok
(
ret
,
"no message available
\n
"
);
todo_wine
ok
(
msg
.
hwnd
==
child
&&
msg
.
message
==
WM_NCMOUSEMOVE
,
"hwnd %p/%p message %04x
\n
"
,
msg
.
hwnd
,
child
,
msg
.
message
);
if
(
msg
.
message
==
WM_NCMOUSEMOVE
)
ret
=
wait_for_message
(
&
msg
);
ok
(
ret
,
"no message available
\n
"
);
ok
(
msg
.
hwnd
==
child
&&
msg
.
message
==
WM_NCLBUTTONDOWN
,
"hwnd %p/%p message %04x
\n
"
,
msg
.
hwnd
,
child
,
msg
.
message
);
ok
(
msg
.
wParam
==
HTSYSMENU
,
"wparam %ld
\n
"
,
msg
.
wParam
);
ret
=
wait_for_message
(
&
msg
);
ok
(
ret
,
"no message available
\n
"
);
ok
(
msg
.
hwnd
==
child
&&
msg
.
message
==
WM_NCLBUTTONUP
,
"hwnd %p/%p message %04x
\n
"
,
msg
.
hwnd
,
child
,
msg
.
message
);
SetCapture
(
child
);
ret
=
wait_for_message
(
&
msg
);
ok
(
ret
,
"no message available
\n
"
);
ok
(
msg
.
hwnd
==
child
&&
msg
.
message
==
WM_LBUTTONDBLCLK
,
"hwnd %p/%p message %04x
\n
"
,
msg
.
hwnd
,
child
,
msg
.
message
);
ok
(
msg
.
wParam
==
MK_LBUTTON
,
"wparam %ld
\n
"
,
msg
.
wParam
);
ret
=
wait_for_message
(
&
msg
);
ok
(
ret
,
"no message available
\n
"
);
todo_wine
ok
(
msg
.
hwnd
==
child
&&
(
msg
.
message
==
WM_NCMOUSELEAVE
||
broken
(
msg
.
message
==
WM_LBUTTONUP
)),
"hwnd %p/%p message %04x
\n
"
,
msg
.
hwnd
,
child
,
msg
.
message
);
if
(
msg
.
message
==
WM_NCMOUSELEAVE
)
ret
=
wait_for_message
(
&
msg
);
ok
(
ret
,
"no message available
\n
"
);
ok
(
msg
.
hwnd
==
child
&&
msg
.
message
==
WM_LBUTTONUP
,
"hwnd %p/%p message %04x
\n
"
,
msg
.
hwnd
,
child
,
msg
.
message
);
ret
=
peek_message
(
&
msg
);
ok
(
!
ret
,
"message %04x available
\n
"
,
msg
.
message
);
done:
/* Clear any messages left behind by WM_MOUSEACTIVATE tests */
flush_events
(
TRUE
);
if
(
child
)
DestroyWindow
(
child
);
DestroyWindow
(
popup
);
}
...
...
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