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
7d867897
Commit
7d867897
authored
Nov 30, 2005
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 30, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for RedrawWindow with an empty region/rectangle, make it
pass under Wine.
parent
fbfb9716
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
painting.c
dlls/user/painting.c
+2
-1
msg.c
dlls/user/tests/msg.c
+18
-3
No files found.
dlls/user/painting.c
View file @
7d867897
...
...
@@ -571,6 +571,7 @@ BOOL WINAPI LockWindowUpdate( HWND hwnd )
*/
BOOL
WINAPI
RedrawWindow
(
HWND
hwnd
,
const
RECT
*
rect
,
HRGN
hrgn
,
UINT
flags
)
{
static
const
RECT
empty
;
BOOL
ret
;
if
(
!
hwnd
)
hwnd
=
GetDesktopWindow
();
...
...
@@ -596,6 +597,7 @@ BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags )
if
(
rect
&&
!
hrgn
)
{
if
(
IsRectEmpty
(
rect
))
rect
=
&
empty
;
ret
=
redraw_window_rects
(
hwnd
,
flags
,
rect
,
1
);
}
else
if
(
!
hrgn
)
...
...
@@ -606,7 +608,6 @@ BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags )
{
DWORD
size
;
RGNDATA
*
data
=
NULL
;
static
const
RECT
empty
;
if
(
!
(
size
=
GetRegionData
(
hrgn
,
0
,
NULL
)))
return
FALSE
;
if
(
!
(
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
)))
return
FALSE
;
...
...
dlls/user/tests/msg.c
View file @
7d867897
...
...
@@ -3925,6 +3925,7 @@ static const struct message WmSetParentStyle[] = {
static
void
test_paint_messages
(
void
)
{
BOOL
ret
;
RECT
rect
;
POINT
pt
;
MSG
msg
;
...
...
@@ -3944,14 +3945,28 @@ static void test_paint_messages(void)
check_update_rgn
(
hwnd
,
0
);
SetRectRgn
(
hrgn
,
10
,
10
,
20
,
20
);
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_INVALIDATE
);
ret
=
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_INVALIDATE
);
ok
(
ret
,
"RedrawWindow returned %d instead of TRUE
\n
"
,
ret
);
check_update_rgn
(
hwnd
,
hrgn
);
SetRectRgn
(
hrgn2
,
20
,
20
,
30
,
30
);
RedrawWindow
(
hwnd
,
NULL
,
hrgn2
,
RDW_INVALIDATE
);
ret
=
RedrawWindow
(
hwnd
,
NULL
,
hrgn2
,
RDW_INVALIDATE
);
ok
(
ret
,
"RedrawWindow returned %d instead of TRUE
\n
"
,
ret
);
CombineRgn
(
hrgn
,
hrgn
,
hrgn2
,
RGN_OR
);
check_update_rgn
(
hwnd
,
hrgn
);
/* validate everything */
RedrawWindow
(
hwnd
,
NULL
,
NULL
,
RDW_VALIDATE
);
ret
=
RedrawWindow
(
hwnd
,
NULL
,
NULL
,
RDW_VALIDATE
);
ok
(
ret
,
"RedrawWindow returned %d instead of TRUE
\n
"
,
ret
);
check_update_rgn
(
hwnd
,
0
);
/* test empty region */
SetRectRgn
(
hrgn
,
10
,
10
,
10
,
15
);
ret
=
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_INVALIDATE
);
ok
(
ret
,
"RedrawWindow returned %d instead of TRUE
\n
"
,
ret
);
check_update_rgn
(
hwnd
,
0
);
/* test empty rect */
SetRect
(
&
rect
,
10
,
10
,
10
,
15
);
ret
=
RedrawWindow
(
hwnd
,
&
rect
,
NULL
,
RDW_INVALIDATE
);
ok
(
ret
,
"RedrawWindow returned %d instead of TRUE
\n
"
,
ret
);
check_update_rgn
(
hwnd
,
0
);
/* flush pending messages */
...
...
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