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
80a222a8
Commit
80a222a8
authored
Sep 14, 2016
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix DefWindowProc(WM_NCRBUTTONDOWN) tests on Win 8 and 10.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ec6a17fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
1 deletion
+36
-1
msg.c
dlls/user32/tests/msg.c
+36
-1
No files found.
dlls/user32/tests/msg.c
View file @
80a222a8
...
...
@@ -13909,6 +13909,25 @@ static const struct message NCRBUTTONDOWNSeq[] =
{
0
}
};
struct
rbuttonup_thread_data
{
HWND
hwnd
;
HANDLE
wndproc_finished
;
};
static
DWORD
CALLBACK
post_rbuttonup_msg
(
void
*
arg
)
{
struct
rbuttonup_thread_data
*
data
=
arg
;
DWORD
ret
;
ret
=
WaitForSingleObject
(
data
->
wndproc_finished
,
500
);
todo_wine
ok
(
ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %x
\n
"
,
ret
);
if
(
ret
==
WAIT_OBJECT_0
)
return
0
;
PostMessageA
(
data
->
hwnd
,
WM_RBUTTONUP
,
0
,
0
);
return
0
;
}
static
void
test_defwinproc
(
void
)
{
HWND
hwnd
;
...
...
@@ -13918,6 +13937,8 @@ static void test_defwinproc(void)
RECT
rect
;
INT
x
,
y
;
LRESULT
res
;
struct
rbuttonup_thread_data
data
;
HANDLE
thread
;
hwnd
=
CreateWindowExA
(
0
,
"TestWindowClass"
,
"test_defwndproc"
,
WS_VISIBLE
|
WS_CAPTION
|
WS_OVERLAPPEDWINDOW
,
0
,
0
,
500
,
100
,
0
,
0
,
0
,
NULL
);
...
...
@@ -13933,11 +13954,25 @@ static void test_defwinproc(void)
res
=
DefWindowProcA
(
hwnd
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
x
,
y
));
ok
(
res
==
HTCAPTION
,
"WM_NCHITTEST returned %ld
\n
"
,
res
);
mouse_event
(
MOUSEEVENTF_LEFTDOWN
,
0
,
0
,
0
,
0
);
mouse_event
(
MOUSEEVENTF_LEFTUP
,
0
,
0
,
0
,
0
);
flush_events
();
flush_sequence
();
PostMessageA
(
hwnd
,
WM_RBUTTONUP
,
0
,
0
);
mouse_event
(
MOUSEEVENTF_RIGHTUP
,
0
,
0
,
0
,
0
);
/* workaround for missing support for clicking on window frame */
data
.
hwnd
=
hwnd
;
data
.
wndproc_finished
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
NULL
);
thread
=
CreateThread
(
NULL
,
0
,
post_rbuttonup_msg
,
(
void
*
)
&
data
,
0
,
NULL
);
DefWindowProcA
(
hwnd
,
WM_NCRBUTTONDOWN
,
HTCAPTION
,
MAKELPARAM
(
x
,
y
));
ok_sequence
(
NCRBUTTONDOWNSeq
,
"WM_NCRBUTTONDOWN on caption"
,
FALSE
);
SetEvent
(
data
.
wndproc_finished
);
WaitForSingleObject
(
thread
,
1000
);
CloseHandle
(
data
.
wndproc_finished
);
CloseHandle
(
thread
);
SetCursorPos
(
pos
.
x
,
pos
.
y
);
DefWindowProcA
(
hwnd
,
WM_ENDSESSION
,
1
,
0
);
...
...
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