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
4bb337fb
Commit
4bb337fb
authored
Mar 18, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add clipping region tests on window resize.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4a4d5a6f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
1 deletion
+43
-1
dce.c
dlls/user32/tests/dce.c
+43
-1
No files found.
dlls/user32/tests/dce.c
View file @
4bb337fb
...
@@ -384,7 +384,7 @@ static void test_dc_visrgn(void)
...
@@ -384,7 +384,7 @@ static void test_dc_visrgn(void)
static
void
test_begin_paint
(
void
)
static
void
test_begin_paint
(
void
)
{
{
HDC
old_hdc
,
hdc
;
HDC
old_hdc
,
hdc
;
RECT
rect
,
parent_rect
;
RECT
rect
,
parent_rect
,
client_rect
;
PAINTSTRUCT
ps
;
PAINTSTRUCT
ps
;
COLORREF
cr
;
COLORREF
cr
;
...
@@ -401,6 +401,33 @@ static void test_begin_paint(void)
...
@@ -401,6 +401,33 @@ static void test_begin_paint(void)
"invalid clip box %s
\n
"
,
wine_dbgstr_rect
(
&
rect
));
"invalid clip box %s
\n
"
,
wine_dbgstr_rect
(
&
rect
));
EndPaint
(
hwnd_cache
,
&
ps
);
EndPaint
(
hwnd_cache
,
&
ps
);
SetWindowPos
(
hwnd_cache
,
0
,
0
,
0
,
100
,
100
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_NOACTIVATE
);
RedrawWindow
(
hwnd_cache
,
NULL
,
0
,
RDW_VALIDATE
|
RDW_NOFRAME
|
RDW_NOERASE
);
SetRect
(
&
rect
,
0
,
0
,
150
,
150
);
RedrawWindow
(
hwnd_cache
,
&
rect
,
0
,
RDW_INVALIDATE
|
RDW_NOFRAME
|
RDW_NOERASE
);
hdc
=
BeginPaint
(
hwnd_cache
,
&
ps
);
GetClipBox
(
hdc
,
&
rect
);
GetClientRect
(
hwnd_cache
,
&
client_rect
);
ok
(
EqualRect
(
&
rect
,
&
client_rect
),
"clip box = %s, expected %s
\n
"
,
wine_dbgstr_rect
(
&
rect
),
wine_dbgstr_rect
(
&
client_rect
));
SetWindowPos
(
hwnd_cache
,
0
,
0
,
0
,
200
,
200
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_NOACTIVATE
);
GetClipBox
(
hdc
,
&
rect
);
GetClientRect
(
hwnd_cache
,
&
client_rect
);
todo_wine
ok
(
(
!
rect
.
left
&&
!
rect
.
top
&&
rect
.
right
==
150
&&
rect
.
bottom
==
150
)
||
broken
(
EqualRect
(
&
rect
,
&
client_rect
)),
"clip box = %s
\n
"
,
wine_dbgstr_rect
(
&
rect
));
EndPaint
(
hwnd_cache
,
&
ps
);
SetWindowPos
(
hwnd_cache
,
0
,
0
,
0
,
100
,
100
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_NOACTIVATE
);
RedrawWindow
(
hwnd_cache
,
NULL
,
0
,
RDW_INVALIDATE
|
RDW_NOFRAME
|
RDW_NOERASE
);
hdc
=
BeginPaint
(
hwnd_cache
,
&
ps
);
SetWindowPos
(
hwnd_cache
,
0
,
0
,
0
,
200
,
200
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_NOACTIVATE
);
GetClipBox
(
hdc
,
&
rect
);
GetClientRect
(
hwnd_cache
,
&
client_rect
);
todo_wine
ok
(
EqualRect
(
&
rect
,
&
client_rect
),
"clip box = %s, expected %s
\n
"
,
wine_dbgstr_rect
(
&
rect
),
wine_dbgstr_rect
(
&
client_rect
));
EndPaint
(
hwnd_cache
,
&
ps
);
/* window DC */
/* window DC */
RedrawWindow
(
hwnd_owndc
,
NULL
,
0
,
RDW_VALIDATE
|
RDW_NOFRAME
|
RDW_NOERASE
);
RedrawWindow
(
hwnd_owndc
,
NULL
,
0
,
RDW_VALIDATE
|
RDW_NOFRAME
|
RDW_NOERASE
);
...
@@ -440,6 +467,21 @@ static void test_begin_paint(void)
...
@@ -440,6 +467,21 @@ static void test_begin_paint(void)
ok
(
!
(
rect
.
left
>=
10
&&
rect
.
top
>=
10
&&
rect
.
right
<=
20
&&
rect
.
bottom
<=
20
),
ok
(
!
(
rect
.
left
>=
10
&&
rect
.
top
>=
10
&&
rect
.
right
<=
20
&&
rect
.
bottom
<=
20
),
"clip box should still be the whole window %s
\n
"
,
wine_dbgstr_rect
(
&
rect
));
"clip box should still be the whole window %s
\n
"
,
wine_dbgstr_rect
(
&
rect
));
SetWindowPos
(
hwnd_owndc
,
0
,
0
,
0
,
100
,
100
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_NOACTIVATE
);
RedrawWindow
(
hwnd_owndc
,
NULL
,
0
,
RDW_VALIDATE
|
RDW_NOFRAME
|
RDW_NOERASE
);
SetRect
(
&
rect
,
0
,
0
,
50
,
50
);
RedrawWindow
(
hwnd_owndc
,
&
rect
,
0
,
RDW_INVALIDATE
|
RDW_ERASE
);
hdc
=
BeginPaint
(
hwnd_owndc
,
&
ps
);
GetClipBox
(
hdc
,
&
rect
);
ok
(
!
rect
.
left
&&
!
rect
.
top
&&
rect
.
right
==
50
&&
rect
.
bottom
==
50
,
"clip box = %s
\n
"
,
wine_dbgstr_rect
(
&
rect
));
SetWindowPos
(
hwnd_owndc
,
0
,
0
,
0
,
200
,
200
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_NOACTIVATE
);
GetClipBox
(
hdc
,
&
rect
);
GetClientRect
(
hwnd_owndc
,
&
client_rect
);
ok
(
EqualRect
(
&
rect
,
&
client_rect
),
"clip box = %s, expected %s
\n
"
,
wine_dbgstr_rect
(
&
rect
),
wine_dbgstr_rect
(
&
client_rect
));
EndPaint
(
hwnd_owndc
,
&
ps
);
/* class DC */
/* class DC */
RedrawWindow
(
hwnd_classdc
,
NULL
,
0
,
RDW_VALIDATE
|
RDW_NOFRAME
|
RDW_NOERASE
);
RedrawWindow
(
hwnd_classdc
,
NULL
,
0
,
RDW_VALIDATE
|
RDW_NOFRAME
|
RDW_NOERASE
);
...
...
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