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
b57323a6
Commit
b57323a6
authored
Sep 17, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add a test for calling UpdateLayeredWindow from a different thread.
parent
4289c74f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
msg.c
dlls/user32/tests/msg.c
+44
-0
No files found.
dlls/user32/tests/msg.c
View file @
b57323a6
...
@@ -13792,6 +13792,27 @@ static const struct message WmSetLayeredStyle2[] = {
...
@@ -13792,6 +13792,27 @@ static const struct message WmSetLayeredStyle2[] = {
{
0
}
{
0
}
};
};
struct
layered_window_info
{
HWND
hwnd
;
HDC
hdc
;
SIZE
size
;
HANDLE
event
;
BOOL
ret
;
};
static
DWORD
CALLBACK
update_layered_proc
(
void
*
param
)
{
struct
layered_window_info
*
info
=
param
;
POINT
src
=
{
0
,
0
};
info
->
ret
=
pUpdateLayeredWindow
(
info
->
hwnd
,
0
,
NULL
,
&
info
->
size
,
info
->
hdc
,
&
src
,
0
,
NULL
,
ULW_OPAQUE
);
ok
(
info
->
ret
,
"failed
\n
"
);
SetEvent
(
info
->
event
);
return
0
;
}
static
void
test_layered_window
(
void
)
static
void
test_layered_window
(
void
)
{
{
HWND
hwnd
;
HWND
hwnd
;
...
@@ -13801,6 +13822,9 @@ static void test_layered_window(void)
...
@@ -13801,6 +13822,9 @@ static void test_layered_window(void)
SIZE
size
;
SIZE
size
;
POINT
pos
,
src
;
POINT
pos
,
src
;
RECT
rect
,
client
;
RECT
rect
,
client
;
HANDLE
thread
;
DWORD
tid
;
struct
layered_window_info
info
;
if
(
!
pUpdateLayeredWindow
)
if
(
!
pUpdateLayeredWindow
)
{
{
...
@@ -13894,6 +13918,26 @@ static void test_layered_window(void)
...
@@ -13894,6 +13918,26 @@ static void test_layered_window(void)
broken
(
rect
.
right
==
client
.
right
-
100
&&
rect
.
bottom
==
client
.
bottom
-
50
),
broken
(
rect
.
right
==
client
.
right
-
100
&&
rect
.
bottom
==
client
.
bottom
-
50
),
"wrong client rect %d,%d,%d,%d
\n
"
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
);
"wrong client rect %d,%d,%d,%d
\n
"
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
);
SetWindowLong
(
hwnd
,
GWL_EXSTYLE
,
GetWindowLong
(
hwnd
,
GWL_EXSTYLE
)
|
WS_EX_LAYERED
);
info
.
hwnd
=
hwnd
;
info
.
hdc
=
hdc
;
info
.
size
.
cx
=
250
;
info
.
size
.
cy
=
300
;
info
.
event
=
CreateEventA
(
NULL
,
TRUE
,
FALSE
,
NULL
);
info
.
ret
=
FALSE
;
thread
=
CreateThread
(
NULL
,
0
,
update_layered_proc
,
&
info
,
0
,
&
tid
);
ok
(
WaitForSingleObject
(
info
.
event
,
1000
)
==
0
,
"wait failed
\n
"
);
ok
(
info
.
ret
,
"UpdateLayeredWindow failed in other thread
\n
"
);
WaitForSingleObject
(
thread
,
1000
);
CloseHandle
(
thread
);
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
rect
.
left
==
200
&&
rect
.
top
==
200
&&
rect
.
right
==
450
&&
rect
.
bottom
==
500
,
"wrong window rect %d,%d,%d,%d
\n
"
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
);
GetClientRect
(
hwnd
,
&
rect
);
ok
(
(
rect
.
right
==
250
&&
rect
.
bottom
==
300
)
||
broken
(
rect
.
right
==
client
.
right
-
100
&&
rect
.
bottom
==
client
.
bottom
-
50
),
"wrong client rect %d,%d,%d,%d
\n
"
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
DeleteDC
(
hdc
);
DeleteDC
(
hdc
);
DeleteObject
(
bmp
);
DeleteObject
(
bmp
);
...
...
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