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
108173fd
Commit
108173fd
authored
Apr 10, 2013
by
Sergey Guralnik
Committed by
Alexandre Julliard
Apr 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: SetWindowPos() propagates update region from WS_CLIPCHILDREN child to its children.
parent
61a6a4f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
0 deletions
+68
-0
win.c
dlls/user32/tests/win.c
+68
-0
No files found.
dlls/user32/tests/win.c
View file @
108173fd
...
...
@@ -7326,6 +7326,73 @@ static void test_map_points(void)
DestroyWindow
(
wnd0
);
}
static
void
test_update_region
(
void
)
{
HWND
hwnd
,
parent
,
child
;
HRGN
rgn1
,
rgn2
;
const
RECT
rc
=
{
15
,
15
,
40
,
40
};
const
POINT
wnd_orig
=
{
30
,
20
};
const
POINT
child_orig
=
{
10
,
5
};
parent
=
CreateWindowExA
(
0
,
"MainWindowClass"
,
NULL
,
WS_VISIBLE
|
WS_CLIPCHILDREN
,
0
,
0
,
300
,
150
,
NULL
,
NULL
,
GetModuleHandleA
(
0
),
0
);
hwnd
=
CreateWindowExA
(
0
,
"MainWindowClass"
,
NULL
,
WS_VISIBLE
|
WS_CLIPCHILDREN
|
WS_CHILD
,
0
,
0
,
200
,
100
,
parent
,
NULL
,
GetModuleHandleA
(
0
),
0
);
child
=
CreateWindowExA
(
0
,
"MainWindowClass"
,
NULL
,
WS_VISIBLE
|
WS_CHILD
,
child_orig
.
x
,
child_orig
.
y
,
100
,
50
,
hwnd
,
NULL
,
GetModuleHandleA
(
0
),
0
);
assert
(
parent
&&
hwnd
&&
child
);
ValidateRgn
(
parent
,
NULL
);
ValidateRgn
(
hwnd
,
NULL
);
InvalidateRect
(
hwnd
,
&
rc
,
FALSE
);
ValidateRgn
(
child
,
NULL
);
rgn1
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
ok
(
GetUpdateRgn
(
parent
,
rgn1
,
FALSE
)
==
NULLREGION
,
"has invalid area after ValidRgn(NULL)
\n
"
);
GetUpdateRgn
(
hwnd
,
rgn1
,
FALSE
);
rgn2
=
CreateRectRgnIndirect
(
&
rc
);
ok
(
EqualRgn
(
rgn1
,
rgn2
),
"assigned and retrieved update regions are different
\n
"
);
ok
(
GetUpdateRgn
(
child
,
rgn2
,
FALSE
)
==
NULLREGION
,
"has invalid area after ValidRgn(NULL)
\n
"
);
SetWindowPos
(
hwnd
,
0
,
wnd_orig
.
x
,
wnd_orig
.
y
,
0
,
0
,
SWP_NOZORDER
|
SWP_NOACTIVATE
|
SWP_NOSIZE
);
/* parent now has non-simple update region, it consist of
* two rects, that was exposed after hwnd moving ... */
SetRectRgn
(
rgn1
,
0
,
0
,
200
,
wnd_orig
.
y
);
SetRectRgn
(
rgn2
,
0
,
0
,
wnd_orig
.
x
,
100
);
CombineRgn
(
rgn1
,
rgn1
,
rgn2
,
RGN_OR
);
/* ... and mapped hwnd's invalid area, that hwnd has before moving */
SetRectRgn
(
rgn2
,
rc
.
left
+
wnd_orig
.
x
,
rc
.
top
+
wnd_orig
.
y
,
rc
.
right
+
wnd_orig
.
x
,
rc
.
bottom
+
wnd_orig
.
y
);
CombineRgn
(
rgn1
,
rgn1
,
rgn2
,
RGN_OR
);
GetUpdateRgn
(
parent
,
rgn2
,
FALSE
);
todo_wine
ok
(
EqualRgn
(
rgn1
,
rgn2
),
"wrong update region
\n
"
);
/* hwnd has the same invalid region as before moving */
SetRectRgn
(
rgn1
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
);
GetUpdateRgn
(
hwnd
,
rgn2
,
FALSE
);
ok
(
EqualRgn
(
rgn1
,
rgn2
),
"wrong update region
\n
"
);
/* hwnd's invalid area maps to child during moving */
SetRectRgn
(
rgn1
,
rc
.
left
-
child_orig
.
x
,
rc
.
top
-
child_orig
.
y
,
rc
.
right
-
child_orig
.
x
,
rc
.
bottom
-
child_orig
.
y
);
GetUpdateRgn
(
child
,
rgn2
,
FALSE
);
todo_wine
ok
(
EqualRgn
(
rgn1
,
rgn2
),
"wrong update region
\n
"
);
DeleteObject
(
rgn1
);
DeleteObject
(
rgn2
);
DestroyWindow
(
parent
);
}
START_TEST
(
win
)
{
HMODULE
user32
=
GetModuleHandleA
(
"user32.dll"
);
...
...
@@ -7435,6 +7502,7 @@ START_TEST(win)
test_handles
(
hwndMain
);
test_winregion
();
test_map_points
();
test_update_region
();
/* add the tests above this line */
if
(
hhook
)
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