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
69414975
Commit
69414975
authored
Jun 04, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Abstract the printing of minmax info and do it all on one line.
parent
3cc1270f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
50 deletions
+16
-50
win.c
dlls/user32/tests/win.c
+16
-50
No files found.
dlls/user32/tests/win.c
View file @
69414975
...
@@ -59,6 +59,16 @@ static DWORD our_pid;
...
@@ -59,6 +59,16 @@ static DWORD our_pid;
#define COUNTOF(arr) (sizeof(arr)/sizeof(arr[0]))
#define COUNTOF(arr) (sizeof(arr)/sizeof(arr[0]))
static
void
dump_minmax_info
(
const
MINMAXINFO
*
minmax
)
{
trace
(
"Reserved=%d,%d MaxSize=%d,%d MaxPos=%d,%d MinTrack=%d,%d MaxTrack=%d,%d
\n
"
,
minmax
->
ptReserved
.
x
,
minmax
->
ptReserved
.
y
,
minmax
->
ptMaxSize
.
x
,
minmax
->
ptMaxSize
.
y
,
minmax
->
ptMaxPosition
.
x
,
minmax
->
ptMaxPosition
.
y
,
minmax
->
ptMinTrackSize
.
x
,
minmax
->
ptMinTrackSize
.
y
,
minmax
->
ptMaxTrackSize
.
x
,
minmax
->
ptMaxTrackSize
.
y
);
}
/* try to make sure pending X events have been processed before continuing */
/* try to make sure pending X events have been processed before continuing */
static
void
flush_events
(
BOOL
remove_messages
)
static
void
flush_events
(
BOOL
remove_messages
)
{
{
...
@@ -552,13 +562,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
...
@@ -552,13 +562,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
MINMAXINFO
*
minmax
=
(
MINMAXINFO
*
)
lparam
;
MINMAXINFO
*
minmax
=
(
MINMAXINFO
*
)
lparam
;
trace
(
"hwnd %p, WM_GETMINMAXINFO, %08lx, %08lx
\n
"
,
hwnd
,
wparam
,
lparam
);
trace
(
"hwnd %p, WM_GETMINMAXINFO, %08lx, %08lx
\n
"
,
hwnd
,
wparam
,
lparam
);
trace
(
"ptReserved (%d,%d), ptMaxSize (%d,%d), ptMaxPosition (%d,%d)
\n
"
dump_minmax_info
(
minmax
);
" ptMinTrackSize (%d,%d), ptMaxTrackSize (%d,%d)
\n
"
,
minmax
->
ptReserved
.
x
,
minmax
->
ptReserved
.
y
,
minmax
->
ptMaxSize
.
x
,
minmax
->
ptMaxSize
.
y
,
minmax
->
ptMaxPosition
.
x
,
minmax
->
ptMaxPosition
.
y
,
minmax
->
ptMinTrackSize
.
x
,
minmax
->
ptMinTrackSize
.
y
,
minmax
->
ptMaxTrackSize
.
x
,
minmax
->
ptMaxTrackSize
.
y
);
SetWindowLongPtrA
(
hwnd
,
GWLP_USERDATA
,
0x20031021
);
SetWindowLongPtrA
(
hwnd
,
GWLP_USERDATA
,
0x20031021
);
break
;
break
;
}
}
...
@@ -652,13 +656,7 @@ static LRESULT WINAPI tool_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
...
@@ -652,13 +656,7 @@ static LRESULT WINAPI tool_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
MINMAXINFO
*
minmax
=
(
MINMAXINFO
*
)
lparam
;
MINMAXINFO
*
minmax
=
(
MINMAXINFO
*
)
lparam
;
trace
(
"hwnd %p, WM_GETMINMAXINFO, %08lx, %08lx
\n
"
,
hwnd
,
wparam
,
lparam
);
trace
(
"hwnd %p, WM_GETMINMAXINFO, %08lx, %08lx
\n
"
,
hwnd
,
wparam
,
lparam
);
trace
(
"ptReserved (%d,%d), ptMaxSize (%d,%d), ptMaxPosition (%d,%d)
\n
"
dump_minmax_info
(
minmax
);
" ptMinTrackSize (%d,%d), ptMaxTrackSize (%d,%d)
\n
"
,
minmax
->
ptReserved
.
x
,
minmax
->
ptReserved
.
y
,
minmax
->
ptMaxSize
.
x
,
minmax
->
ptMaxSize
.
y
,
minmax
->
ptMaxPosition
.
x
,
minmax
->
ptMaxPosition
.
y
,
minmax
->
ptMinTrackSize
.
x
,
minmax
->
ptMinTrackSize
.
y
,
minmax
->
ptMaxTrackSize
.
x
,
minmax
->
ptMaxTrackSize
.
y
);
SetWindowLongPtrA
(
hwnd
,
GWLP_USERDATA
,
0x20031021
);
SetWindowLongPtrA
(
hwnd
,
GWLP_USERDATA
,
0x20031021
);
break
;
break
;
}
}
...
@@ -741,9 +739,6 @@ static void verify_window_info(HWND hwnd, const WINDOWINFO *info)
...
@@ -741,9 +739,6 @@ static void verify_window_info(HWND hwnd, const WINDOWINFO *info)
ok
(
info
->
dwWindowStatus
==
status
,
"wrong dwWindowStatus: %04x != %04x
\n
"
,
ok
(
info
->
dwWindowStatus
==
status
,
"wrong dwWindowStatus: %04x != %04x
\n
"
,
info
->
dwWindowStatus
,
status
);
info
->
dwWindowStatus
,
status
);
trace
(
"rcWindow: %d,%d - %d,%d
\n
"
,
rcWindow
.
left
,
rcWindow
.
top
,
rcWindow
.
right
,
rcWindow
.
bottom
);
trace
(
"rcClient: %d,%d - %d,%d
\n
"
,
rcClient
.
left
,
rcClient
.
top
,
rcClient
.
right
,
rcClient
.
bottom
);
/* win2k and XP return broken border info in GetWindowInfo most of
/* win2k and XP return broken border info in GetWindowInfo most of
* the time, so there is no point in testing it.
* the time, so there is no point in testing it.
*/
*/
...
@@ -1422,17 +1417,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
...
@@ -1422,17 +1417,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
style
&=
~
WS_BORDER
;
/* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
style
&=
~
WS_BORDER
;
/* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
AdjustWindowRectEx
(
&
rc
,
style
,
0
,
exstyle
);
AdjustWindowRectEx
(
&
rc
,
style
,
0
,
exstyle
);
trace
(
"MDI child: calculated max window size = (%d x %d)
\n
"
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
);
trace
(
"MDI child: calculated max window size = (%d x %d)
\n
"
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
);
dump_minmax_info
(
minmax
);
trace
(
"ptReserved = (%d,%d)
\n
"
"ptMaxSize = (%d,%d)
\n
"
"ptMaxPosition = (%d,%d)
\n
"
"ptMinTrackSize = (%d,%d)
\n
"
"ptMaxTrackSize = (%d,%d)
\n
"
,
minmax
->
ptReserved
.
x
,
minmax
->
ptReserved
.
y
,
minmax
->
ptMaxSize
.
x
,
minmax
->
ptMaxSize
.
y
,
minmax
->
ptMaxPosition
.
x
,
minmax
->
ptMaxPosition
.
y
,
minmax
->
ptMinTrackSize
.
x
,
minmax
->
ptMinTrackSize
.
y
,
minmax
->
ptMaxTrackSize
.
x
,
minmax
->
ptMaxTrackSize
.
y
);
ok
(
minmax
->
ptMaxSize
.
x
==
rc
.
right
-
rc
.
left
,
"default width of maximized child %d != %d
\n
"
,
ok
(
minmax
->
ptMaxSize
.
x
==
rc
.
right
-
rc
.
left
,
"default width of maximized child %d != %d
\n
"
,
minmax
->
ptMaxSize
.
x
,
rc
.
right
-
rc
.
left
);
minmax
->
ptMaxSize
.
x
,
rc
.
right
-
rc
.
left
);
...
@@ -1441,17 +1426,8 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
...
@@ -1441,17 +1426,8 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
DefMDIChildProcA
(
hwnd
,
msg
,
wparam
,
lparam
);
DefMDIChildProcA
(
hwnd
,
msg
,
wparam
,
lparam
);
trace
(
"DefMDIChildProc returned:
\n
"
trace
(
"DefMDIChildProc returned:
\n
"
);
"ptReserved = (%d,%d)
\n
"
dump_minmax_info
(
minmax
);
"ptMaxSize = (%d,%d)
\n
"
"ptMaxPosition = (%d,%d)
\n
"
"ptMinTrackSize = (%d,%d)
\n
"
"ptMaxTrackSize = (%d,%d)
\n
"
,
minmax
->
ptReserved
.
x
,
minmax
->
ptReserved
.
y
,
minmax
->
ptMaxSize
.
x
,
minmax
->
ptMaxSize
.
y
,
minmax
->
ptMaxPosition
.
x
,
minmax
->
ptMaxPosition
.
y
,
minmax
->
ptMinTrackSize
.
x
,
minmax
->
ptMinTrackSize
.
y
,
minmax
->
ptMaxTrackSize
.
x
,
minmax
->
ptMaxTrackSize
.
y
);
MDI_ChildGetMinMaxInfo
(
client
,
hwnd
,
&
my_minmax
);
MDI_ChildGetMinMaxInfo
(
client
,
hwnd
,
&
my_minmax
);
ok
(
minmax
->
ptMaxSize
.
x
==
my_minmax
.
ptMaxSize
.
x
,
"default width of maximized child %d != %d
\n
"
,
ok
(
minmax
->
ptMaxSize
.
x
==
my_minmax
.
ptMaxSize
.
x
,
"default width of maximized child %d != %d
\n
"
,
...
@@ -1529,17 +1505,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
...
@@ -1529,17 +1505,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
style
&=
~
WS_BORDER
;
/* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
style
&=
~
WS_BORDER
;
/* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
AdjustWindowRectEx
(
&
rc
,
style
,
0
,
exstyle
);
AdjustWindowRectEx
(
&
rc
,
style
,
0
,
exstyle
);
trace
(
"calculated max child window size = (%d x %d)
\n
"
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
);
trace
(
"calculated max child window size = (%d x %d)
\n
"
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
);
dump_minmax_info
(
minmax
);
trace
(
"ptReserved = (%d,%d)
\n
"
"ptMaxSize = (%d,%d)
\n
"
"ptMaxPosition = (%d,%d)
\n
"
"ptMinTrackSize = (%d,%d)
\n
"
"ptMaxTrackSize = (%d,%d)
\n
"
,
minmax
->
ptReserved
.
x
,
minmax
->
ptReserved
.
y
,
minmax
->
ptMaxSize
.
x
,
minmax
->
ptMaxSize
.
y
,
minmax
->
ptMaxPosition
.
x
,
minmax
->
ptMaxPosition
.
y
,
minmax
->
ptMinTrackSize
.
x
,
minmax
->
ptMinTrackSize
.
y
,
minmax
->
ptMaxTrackSize
.
x
,
minmax
->
ptMaxTrackSize
.
y
);
ok
(
minmax
->
ptMaxSize
.
x
==
rc
.
right
-
rc
.
left
,
"default width of maximized child %d != %d
\n
"
,
ok
(
minmax
->
ptMaxSize
.
x
==
rc
.
right
-
rc
.
left
,
"default width of maximized child %d != %d
\n
"
,
minmax
->
ptMaxSize
.
x
,
rc
.
right
-
rc
.
left
);
minmax
->
ptMaxSize
.
x
,
rc
.
right
-
rc
.
left
);
...
...
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