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
dc1a7113
Commit
dc1a7113
authored
Jan 24, 2009
by
Florian Köberle
Committed by
Alexandre Julliard
Jan 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Use AdjustWindowRectEx to calculate minTrack and maxPosition.
parent
5ea119a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
36 deletions
+22
-36
win.c
dlls/user32/tests/win.c
+22
-36
No files found.
dlls/user32/tests/win.c
View file @
dc1a7113
...
...
@@ -5228,31 +5228,6 @@ static void test_fullscreen(void)
}
static
BOOL
test_thick_child_got_minmax
;
static
int
getExpectedBorderSize
(
LONG
style
,
LONG
exStyle
)
{
int
border
;
if
((
exStyle
&
(
WS_EX_STATICEDGE
|
WS_EX_DLGMODALFRAME
))
==
WS_EX_STATICEDGE
)
{
border
=
1
;
/* for the outer frame always present */
}
else
{
border
=
0
;
if
((
exStyle
&
WS_EX_DLGMODALFRAME
)
||
(
style
&
(
WS_THICKFRAME
|
WS_DLGFRAME
)))
border
=
2
;
/* outer */
}
if
(
style
&
WS_THICKFRAME
)
border
+=
(
GetSystemMetrics
(
SM_CXFRAME
)
-
GetSystemMetrics
(
SM_CXDLGFRAME
));
/* The resize border */
if
((
style
&
(
WS_BORDER
|
WS_DLGFRAME
))
||
(
exStyle
&
WS_EX_DLGMODALFRAME
))
border
++
;
/* The other border */
return
border
;
}
static
const
char
*
test_thick_child_name
;
static
LONG
test_thick_child_style
;
static
LONG
test_thick_child_exStyle
;
...
...
@@ -5288,6 +5263,13 @@ static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM
test_thick_child_got_minmax
=
TRUE
;
adjustedStyle
=
test_thick_child_style
;
if
((
adjustedStyle
&
WS_CAPTION
)
==
WS_CAPTION
)
adjustedStyle
&=
~
WS_BORDER
;
/* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
GetClientRect
(
GetParent
(
hwnd
),
&
rect
);
AdjustWindowRectEx
(
&
rect
,
adjustedStyle
,
FALSE
,
test_thick_child_exStyle
);
if
(
test_thick_child_style
&
(
WS_DLGFRAME
|
WS_BORDER
))
{
expectedMinTrackX
=
GetSystemMetrics
(
SM_CXMINTRACK
);
...
...
@@ -5295,8 +5277,8 @@ static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM
}
else
{
expectedMinTrackX
=
2
*
getExpectedBorderSize
(
test_thick_child_style
,
test_thick_child_exStyle
)
;
expectedMinTrackY
=
2
*
getExpectedBorderSize
(
test_thick_child_style
,
test_thick_child_exStyle
)
;
expectedMinTrackX
=
-
2
*
rect
.
left
;
expectedMinTrackY
=
-
2
*
rect
.
top
;
}
actualMinTrackX
=
minmax
->
ptMinTrackSize
.
x
;
actualMinTrackY
=
minmax
->
ptMinTrackSize
.
y
;
...
...
@@ -5324,11 +5306,6 @@ static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM
expectedMaxTrackX
,
expectedMaxTrackY
,
actualMaxTrackX
,
actualMaxTrackY
,
test_thick_child_name
);
adjustedStyle
=
test_thick_child_style
;
if
((
adjustedStyle
&
WS_CAPTION
)
==
WS_CAPTION
)
adjustedStyle
&=
~
WS_BORDER
;
/* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
GetClientRect
(
GetParent
(
hwnd
),
&
rect
);
AdjustWindowRectEx
(
&
rect
,
adjustedStyle
,
FALSE
,
test_thick_child_exStyle
);
expectedMaxSizeX
=
rect
.
right
-
rect
.
left
;
expectedMaxSizeY
=
rect
.
bottom
-
rect
.
top
;
actualMaxSizeX
=
minmax
->
ptMaxSize
.
x
;
...
...
@@ -5340,8 +5317,8 @@ static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM
test_thick_child_name
);
expectedPosX
=
-
getExpectedBorderSize
(
test_thick_child_style
,
test_thick_child_exStyle
)
;
expectedPosY
=
expectedPosX
;
expectedPosX
=
rect
.
left
;
expectedPosY
=
rect
.
top
;
actualPosX
=
minmax
->
ptMaxPosition
.
x
;
actualPosY
=
minmax
->
ptMaxPosition
.
y
;
todo_wine
...
...
@@ -5361,6 +5338,7 @@ static void test_thick_child_size(HWND parentWindow)
{
BOOL
success
;
RECT
childRect
;
RECT
adjustedParentRect
;
HWND
childWindow
;
LONG
childWidth
;
LONG
childHeight
;
...
...
@@ -5369,6 +5347,7 @@ static void test_thick_child_size(HWND parentWindow)
WNDCLASSA
cls
;
LPCTSTR
className
=
"THICK_CHILD_CLASS"
;
int
i
;
LONG
adjustedStyle
;
static
const
LONG
styles
[
NUMBER_OF_THICK_CHILD_TESTS
]
=
{
WS_CHILD
|
WS_VISIBLE
|
WS_THICKFRAME
,
WS_CHILD
|
WS_VISIBLE
|
WS_THICKFRAME
|
WS_DLGFRAME
,
...
...
@@ -5457,6 +5436,13 @@ static void test_thick_child_size(HWND parentWindow)
childWidth
=
childRect
.
right
-
childRect
.
left
;
childHeight
=
childRect
.
bottom
-
childRect
.
top
;
adjustedStyle
=
styles
[
i
];
if
((
adjustedStyle
&
WS_CAPTION
)
==
WS_CAPTION
)
adjustedStyle
&=
~
WS_BORDER
;
/* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
GetClientRect
(
GetParent
(
childWindow
),
&
adjustedParentRect
);
AdjustWindowRectEx
(
&
adjustedParentRect
,
adjustedStyle
,
FALSE
,
test_thick_child_exStyle
);
if
(
test_thick_child_style
&
(
WS_DLGFRAME
|
WS_BORDER
))
{
expectedWidth
=
GetSystemMetrics
(
SM_CXMINTRACK
);
...
...
@@ -5464,8 +5450,8 @@ static void test_thick_child_size(HWND parentWindow)
}
else
{
expectedWidth
=
2
*
getExpectedBorderSize
(
test_thick_child_style
,
test_thick_child_exStyle
)
;
expectedHeight
=
2
*
getExpectedBorderSize
(
test_thick_child_style
,
test_thick_child_exStyle
)
;
expectedWidth
=
-
2
*
adjustedParentRect
.
left
;
expectedHeight
=
-
2
*
adjustedParentRect
.
top
;
}
if
(
!
(
test_thick_child_style
&
(
WS_DLGFRAME
|
WS_BORDER
)))
...
...
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