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
ed0eaecf
Commit
ed0eaecf
authored
Feb 19, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Correctly calculate the client size of a minimized window.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
119e215e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
11 deletions
+33
-11
nonclient.c
dlls/user32/nonclient.c
+5
-0
win.c
dlls/user32/tests/win.c
+28
-11
No files found.
dlls/user32/nonclient.c
View file @
ed0eaecf
...
...
@@ -414,6 +414,11 @@ LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
if
(
winRect
->
left
>
winRect
->
right
)
winRect
->
right
=
winRect
->
left
;
}
else
{
winRect
->
right
=
winRect
->
left
;
winRect
->
bottom
=
winRect
->
top
;
}
return
result
;
}
...
...
dlls/user32/tests/win.c
View file @
ed0eaecf
...
...
@@ -6469,7 +6469,7 @@ static void test_ShowWindow(void)
{
HWND
hwnd
;
DWORD
style
;
RECT
rcMain
,
rc
,
rcMinimized
,
rcClient
,
rcEmpty
,
rcMaximized
,
rcResized
;
RECT
rcMain
,
rc
,
rcMinimized
,
rcClient
,
rcEmpty
,
rcMaximized
,
rcResized
,
rcNonClient
;
LPARAM
ret
;
MONITORINFO
mon_info
;
...
...
@@ -6533,7 +6533,6 @@ static void test_ShowWindow(void)
ok
(
EqualRect
(
&
rcMinimized
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcMinimized
),
wine_dbgstr_rect
(
&
rc
));
GetClientRect
(
hwnd
,
&
rc
);
todo_wine
ok
(
EqualRect
(
&
rcEmpty
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcEmpty
),
wine_dbgstr_rect
(
&
rc
));
/* shouldn't be able to resize minimized windows */
...
...
@@ -6547,7 +6546,6 @@ static void test_ShowWindow(void)
ok
(
EqualRect
(
&
rcMinimized
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcMinimized
),
wine_dbgstr_rect
(
&
rc
));
GetClientRect
(
hwnd
,
&
rc
);
todo_wine
ok
(
EqualRect
(
&
rcEmpty
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcEmpty
),
wine_dbgstr_rect
(
&
rc
));
/* SetWindowPos shouldn't affect the client rect */
...
...
@@ -6559,9 +6557,14 @@ static void test_ShowWindow(void)
ok
(
EqualRect
(
&
rcMinimized
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcMinimized
),
wine_dbgstr_rect
(
&
rc
));
GetClientRect
(
hwnd
,
&
rc
);
todo_wine
ok
(
EqualRect
(
&
rcEmpty
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcEmpty
),
wine_dbgstr_rect
(
&
rc
));
/* test NC area */
GetWindowRect
(
hwnd
,
&
rc
);
SetRect
(
&
rcNonClient
,
rc
.
left
,
rc
.
top
,
rc
.
left
,
rc
.
top
);
DefWindowProcA
(
hwnd
,
WM_NCCALCSIZE
,
0
,
(
LPARAM
)
&
rc
);
ok
(
EqualRect
(
&
rc
,
&
rcNonClient
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcNonClient
),
wine_dbgstr_rect
(
&
rc
));
ShowWindow
(
hwnd
,
SW_RESTORE
);
ok
(
ret
,
"not expected ret: %lu
\n
"
,
ret
);
...
...
@@ -6651,7 +6654,6 @@ static void test_ShowWindow(void)
ok
(
EqualRect
(
&
rcMinimized
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcMinimized
),
wine_dbgstr_rect
(
&
rc
));
GetClientRect
(
hwnd
,
&
rc
);
todo_wine
ok
(
EqualRect
(
&
rcEmpty
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcEmpty
),
wine_dbgstr_rect
(
&
rc
));
...
...
@@ -6667,7 +6669,6 @@ static void test_ShowWindow(void)
ok
(
EqualRect
(
&
rcMinimized
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcMinimized
),
wine_dbgstr_rect
(
&
rc
));
GetClientRect
(
hwnd
,
&
rc
);
todo_wine
ok
(
EqualRect
(
&
rcEmpty
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcEmpty
),
wine_dbgstr_rect
(
&
rc
));
...
...
@@ -6710,7 +6711,6 @@ static void test_ShowWindow(void)
ok
(
EqualRect
(
&
rcMinimized
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcMinimized
),
wine_dbgstr_rect
(
&
rc
));
GetClientRect
(
hwnd
,
&
rc
);
todo_wine
ok
(
EqualRect
(
&
rcEmpty
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcEmpty
),
wine_dbgstr_rect
(
&
rc
));
DestroyWindow
(
hwnd
);
...
...
@@ -6729,7 +6729,6 @@ static void test_ShowWindow(void)
ok
(
EqualRect
(
&
rcMinimized
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcMinimized
),
wine_dbgstr_rect
(
&
rc
));
GetClientRect
(
hwnd
,
&
rc
);
todo_wine
ok
(
EqualRect
(
&
rcEmpty
,
&
rc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
rcEmpty
),
wine_dbgstr_rect
(
&
rc
));
DestroyWindow
(
hwnd
);
...
...
@@ -6740,7 +6739,7 @@ static void test_ShowWindow(void)
static
void
test_ShowWindow_owned
(
HWND
hwndMain
)
{
MONITORINFO
mon_info
=
{
sizeof
(
mon_info
)};
RECT
rect
,
orig
,
expect
;
RECT
rect
,
orig
,
expect
,
nc
;
BOOL
ret
;
HWND
hwnd
,
hwnd2
;
LONG
style
;
...
...
@@ -6798,6 +6797,12 @@ static void test_ShowWindow_owned(HWND hwndMain)
todo_wine
ok
(
EqualRect
(
&
expect
,
&
rect
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
expect
),
wine_dbgstr_rect
(
&
rect
));
/* test NC area */
GetWindowRect
(
hwnd
,
&
rect
);
SetRect
(
&
nc
,
rect
.
left
,
rect
.
top
,
rect
.
left
,
rect
.
top
);
DefWindowProcA
(
hwnd
,
WM_NCCALCSIZE
,
0
,
(
LPARAM
)
&
rect
);
ok
(
EqualRect
(
&
rect
,
&
nc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
nc
),
wine_dbgstr_rect
(
&
rect
));
/* multiple minimized owned windows stack next to each other (and eventually
* on top of each other) */
...
...
@@ -6863,7 +6868,7 @@ static void test_ShowWindow_owned(HWND hwndMain)
static
void
test_ShowWindow_child
(
HWND
hwndMain
)
{
RECT
rect
,
orig
,
expect
;
RECT
rect
,
orig
,
expect
,
nc
;
BOOL
ret
;
HWND
hwnd
,
hwnd2
;
LONG
style
;
...
...
@@ -6926,6 +6931,12 @@ static void test_ShowWindow_child(HWND hwndMain)
todo_wine
ok
(
EqualRect
(
&
expect
,
&
rect
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
expect
),
wine_dbgstr_rect
(
&
rect
));
/* test NC area */
GetWindowRect
(
hwnd
,
&
rect
);
SetRect
(
&
nc
,
rect
.
left
,
rect
.
top
,
rect
.
left
,
rect
.
top
);
DefWindowProcA
(
hwnd
,
WM_NCCALCSIZE
,
0
,
(
LPARAM
)
&
rect
);
ok
(
EqualRect
(
&
rect
,
&
nc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
nc
),
wine_dbgstr_rect
(
&
rect
));
/* multiple minimized children also stack; here the parent is too small to
* fit more than one per row */
...
...
@@ -6993,7 +7004,7 @@ static void test_ShowWindow_child(HWND hwndMain)
static
void
test_ShowWindow_mdichild
(
HWND
hwndMain
)
{
RECT
rect
,
orig
,
expect
;
RECT
rect
,
orig
,
expect
,
nc
;
BOOL
ret
;
HWND
mdiclient
,
hwnd
,
hwnd2
;
LONG
style
;
...
...
@@ -7051,6 +7062,12 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
todo_wine
ok
(
EqualRect
(
&
expect
,
&
rect
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
expect
),
wine_dbgstr_rect
(
&
rect
));
/* test NC area */
GetWindowRect
(
hwnd
,
&
rect
);
SetRect
(
&
nc
,
rect
.
left
,
rect
.
top
,
rect
.
left
,
rect
.
top
);
DefWindowProcA
(
hwnd
,
WM_NCCALCSIZE
,
0
,
(
LPARAM
)
&
rect
);
ok
(
EqualRect
(
&
rect
,
&
nc
),
"expected %s, got %s
\n
"
,
wine_dbgstr_rect
(
&
nc
),
wine_dbgstr_rect
(
&
rect
));
/* multiple minimized children also stack; here the parent is too small to
* fit more than one per row */
...
...
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