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
d4d12801
Commit
d4d12801
authored
Apr 13, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Included padded border into the border width in NONCLIENTMETRICS.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6b42665b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
sysparams.c
dlls/user32/sysparams.c
+8
-6
sysparams.c
dlls/user32/tests/sysparams.c
+2
-0
No files found.
dlls/user32/sysparams.c
View file @
d4d12801
...
...
@@ -1616,10 +1616,12 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case
SPI_GETNONCLIENTMETRICS
:
{
LPNONCLIENTMETRICSW
lpnm
=
pvParam
;
int
padded_border
;
if
(
!
pvParam
)
return
FALSE
;
ret
=
get_entry
(
&
entry_BORDER
,
0
,
&
lpnm
->
iBorderWidth
)
&&
get_entry
(
&
entry_PADDEDBORDERWIDTH
,
0
,
&
padded_border
)
&&
get_entry
(
&
entry_SCROLLWIDTH
,
0
,
&
lpnm
->
iScrollWidth
)
&&
get_entry
(
&
entry_SCROLLHEIGHT
,
0
,
&
lpnm
->
iScrollHeight
)
&&
get_entry
(
&
entry_CAPTIONWIDTH
,
0
,
&
lpnm
->
iCaptionWidth
)
&&
...
...
@@ -1633,19 +1635,22 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
get_entry
(
&
entry_MENULOGFONT
,
0
,
&
lpnm
->
lfMenuFont
)
&&
get_entry
(
&
entry_STATUSLOGFONT
,
0
,
&
lpnm
->
lfStatusFont
)
&&
get_entry
(
&
entry_MESSAGELOGFONT
,
0
,
&
lpnm
->
lfMessageFont
);
if
(
ret
&&
lpnm
->
cbSize
==
sizeof
(
NONCLIENTMETRICSW
))
ret
=
get_entry
(
&
entry_PADDEDBORDERWIDTH
,
0
,
&
lpnm
->
iPaddedBorderWidth
)
;
lpnm
->
iBorderWidth
+=
padded_border
;
if
(
ret
&&
lpnm
->
cbSize
==
sizeof
(
NONCLIENTMETRICSW
))
lpnm
->
iPaddedBorderWidth
=
0
;
normalize_nonclientmetrics
(
lpnm
);
break
;
}
case
SPI_SETNONCLIENTMETRICS
:
{
LPNONCLIENTMETRICSW
lpnm
=
pvParam
;
int
padded_border
;
if
(
lpnm
&&
(
lpnm
->
cbSize
==
sizeof
(
NONCLIENTMETRICSW
)
||
lpnm
->
cbSize
==
FIELD_OFFSET
(
NONCLIENTMETRICSW
,
iPaddedBorderWidth
)))
{
ret
=
set_entry
(
&
entry_BORDER
,
lpnm
->
iBorderWidth
,
NULL
,
fWinIni
)
&&
get_entry
(
&
entry_PADDEDBORDERWIDTH
,
0
,
&
padded_border
);
ret
=
set_entry
(
&
entry_BORDER
,
lpnm
->
iBorderWidth
-
padded_border
,
NULL
,
fWinIni
)
&&
set_entry
(
&
entry_SCROLLWIDTH
,
lpnm
->
iScrollWidth
,
NULL
,
fWinIni
)
&&
set_entry
(
&
entry_SCROLLHEIGHT
,
lpnm
->
iScrollHeight
,
NULL
,
fWinIni
)
&&
set_entry
(
&
entry_CAPTIONWIDTH
,
lpnm
->
iCaptionWidth
,
NULL
,
fWinIni
)
&&
...
...
@@ -1659,9 +1664,6 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
set_entry
(
&
entry_SMCAPTIONLOGFONT
,
0
,
&
lpnm
->
lfSmCaptionFont
,
fWinIni
)
&&
set_entry
(
&
entry_STATUSLOGFONT
,
0
,
&
lpnm
->
lfStatusFont
,
fWinIni
)
&&
set_entry
(
&
entry_MESSAGELOGFONT
,
0
,
&
lpnm
->
lfMessageFont
,
fWinIni
);
if
(
ret
&&
lpnm
->
cbSize
==
sizeof
(
NONCLIENTMETRICSW
))
set_entry
(
&
entry_PADDEDBORDERWIDTH
,
lpnm
->
iPaddedBorderWidth
,
NULL
,
fWinIni
);
}
break
;
}
...
...
dlls/user32/tests/sysparams.c
View file @
d4d12801
...
...
@@ -2710,8 +2710,10 @@ static void test_GetSystemMetrics( void)
ncm
.
cbSize
=
sizeof
(
ncm
);
/* Vista added padding */
SetLastError
(
0xdeadbeef
);
ncm
.
iPaddedBorderWidth
=
0xcccc
;
rc
=
SystemParametersInfoA
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
ok
(
rc
||
broken
(
!
rc
)
/* before Vista */
,
"SystemParametersInfoA failed
\n
"
);
if
(
rc
)
ok
(
ncm
.
iPaddedBorderWidth
==
0
,
"wrong iPaddedBorderWidth %u
\n
"
,
ncm
.
iPaddedBorderWidth
);
minim
.
cbSize
=
sizeof
(
minim
);
ncm
.
cbSize
=
FIELD_OFFSET
(
NONCLIENTMETRICSA
,
iPaddedBorderWidth
);
...
...
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