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
8417d41a
Commit
8417d41a
authored
Feb 16, 2005
by
Rein Klazes
Committed by
Alexandre Julliard
Feb 16, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Calling ValidateRect or ValidateRgn on a windows also validates the
children. Add a test to show the behavior.
parent
654a0041
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
2 deletions
+40
-2
painting.c
dlls/user/painting.c
+2
-2
win.c
dlls/user/tests/win.c
+38
-0
No files found.
dlls/user/painting.c
View file @
8417d41a
...
...
@@ -492,7 +492,7 @@ BOOL WINAPI InvalidateRect( HWND hwnd, const RECT *rect, BOOL erase )
*/
BOOL
WINAPI
ValidateRgn
(
HWND
hwnd
,
HRGN
hrgn
)
{
return
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_VALIDATE
|
RDW_NOCHILDREN
);
return
RedrawWindow
(
hwnd
,
NULL
,
hrgn
,
RDW_VALIDATE
);
}
...
...
@@ -501,7 +501,7 @@ BOOL WINAPI ValidateRgn( HWND hwnd, HRGN hrgn )
*/
BOOL
WINAPI
ValidateRect
(
HWND
hwnd
,
const
RECT
*
rect
)
{
return
RedrawWindow
(
hwnd
,
rect
,
0
,
RDW_VALIDATE
|
RDW_NOCHILDREN
);
return
RedrawWindow
(
hwnd
,
rect
,
0
,
RDW_VALIDATE
);
}
...
...
dlls/user/tests/win.c
View file @
8417d41a
...
...
@@ -2194,6 +2194,43 @@ static void test_mouse_input(HWND hwnd)
DestroyWindow
(
popup
);
}
static
void
test_validatergn
(
HWND
hwnd
)
{
HWND
child
;
RECT
rc
,
rc2
;
HRGN
rgn
;
int
ret
;
child
=
CreateWindowExA
(
0
,
"static"
,
NULL
,
WS_CHILD
|
WS_VISIBLE
,
10
,
10
,
10
,
10
,
hwnd
,
0
,
0
,
NULL
);
ShowWindow
(
hwnd
,
SW_SHOW
);
UpdateWindow
(
hwnd
);
/* test that ValidateRect validates children*/
InvalidateRect
(
child
,
NULL
,
1
);
GetWindowRect
(
child
,
&
rc
);
MapWindowPoints
(
NULL
,
hwnd
,
(
POINT
*
)
&
rc
,
2
);
ret
=
GetUpdateRect
(
child
,
&
rc2
,
0
);
ok
(
rc2
.
right
>
rc2
.
left
&&
rc2
.
bottom
>
rc2
.
top
,
"Update rectangle is empty!
\n
"
);
ValidateRect
(
hwnd
,
&
rc
);
ret
=
GetUpdateRect
(
child
,
&
rc2
,
0
);
ok
(
rc2
.
left
==
0
&&
rc2
.
top
==
0
&&
rc2
.
right
==
0
&&
rc2
.
bottom
==
0
,
"Update rectangle %ld,%ld-%ld,%ld is not empty!
\n
"
,
rc2
.
left
,
rc2
.
top
,
rc2
.
right
,
rc2
.
bottom
);
/* now test ValidateRgn */
InvalidateRect
(
child
,
NULL
,
1
);
GetWindowRect
(
child
,
&
rc
);
MapWindowPoints
(
NULL
,
hwnd
,
(
POINT
*
)
&
rc
,
2
);
rgn
=
CreateRectRgnIndirect
(
&
rc
);
ValidateRgn
(
hwnd
,
rgn
);
ret
=
GetUpdateRect
(
child
,
&
rc2
,
0
);
ok
(
rc2
.
left
==
0
&&
rc2
.
top
==
0
&&
rc2
.
right
==
0
&&
rc2
.
bottom
==
0
,
"Update rectangle %ld,%ld-%ld,%ld is not empty!
\n
"
,
rc2
.
left
,
rc2
.
top
,
rc2
.
right
,
rc2
.
bottom
);
DeleteObject
(
rgn
);
DestroyWindow
(
child
);
}
START_TEST
(
win
)
{
pGetAncestor
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"user32.dll"
),
"GetAncestor"
);
...
...
@@ -2249,6 +2286,7 @@ START_TEST(win)
test_children_zorder
(
hwndMain
);
test_keyboard_input
(
hwndMain
);
test_mouse_input
(
hwndMain
);
test_validatergn
(
hwndMain
);
UnhookWindowsHookEx
(
hhook
);
}
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