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
ded41970
Commit
ded41970
authored
Jan 03, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Initialize cbSize of NONCLIENTMETRICSW struct in GetSystemMetrics.
parent
2b455abb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
sysparams.c
dlls/user32/sysparams.c
+5
-0
No files found.
dlls/user32/sysparams.c
View file @
ded41970
...
@@ -2419,6 +2419,7 @@ INT WINAPI GetSystemMetrics( INT index )
...
@@ -2419,6 +2419,7 @@ INT WINAPI GetSystemMetrics( INT index )
case
SM_RESERVED4
:
case
SM_RESERVED4
:
return
0
;
return
0
;
case
SM_CXMIN
:
case
SM_CXMIN
:
ncm
.
cbSize
=
sizeof
(
ncm
);
SystemParametersInfoW
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
SystemParametersInfoW
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
get_text_metr_size
(
get_display_dc
(),
&
ncm
.
lfCaptionFont
,
NULL
,
&
ret
);
get_text_metr_size
(
get_display_dc
(),
&
ncm
.
lfCaptionFont
,
NULL
,
&
ret
);
return
3
*
ncm
.
iCaptionWidth
+
ncm
.
iCaptionHeight
+
4
*
ret
+
2
*
GetSystemMetrics
(
SM_CXFRAME
)
+
4
;
return
3
*
ncm
.
iCaptionWidth
+
ncm
.
iCaptionHeight
+
4
*
ret
+
2
*
GetSystemMetrics
(
SM_CXFRAME
)
+
4
;
...
@@ -2428,6 +2429,7 @@ INT WINAPI GetSystemMetrics( INT index )
...
@@ -2428,6 +2429,7 @@ INT WINAPI GetSystemMetrics( INT index )
get_entry
(
&
entry_CAPTIONWIDTH
,
0
,
&
ret
);
get_entry
(
&
entry_CAPTIONWIDTH
,
0
,
&
ret
);
return
max
(
8
,
ret
);
return
max
(
8
,
ret
);
case
SM_CYSIZE
:
case
SM_CYSIZE
:
ncm
.
cbSize
=
sizeof
(
ncm
);
SystemParametersInfoW
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
SystemParametersInfoW
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
return
ncm
.
iCaptionHeight
;
return
ncm
.
iCaptionHeight
;
case
SM_CXFRAME
:
case
SM_CXFRAME
:
...
@@ -2486,12 +2488,14 @@ INT WINAPI GetSystemMetrics( INT index )
...
@@ -2486,12 +2488,14 @@ INT WINAPI GetSystemMetrics( INT index )
get_entry
(
&
entry_SMCAPTIONWIDTH
,
0
,
&
ret
);
get_entry
(
&
entry_SMCAPTIONWIDTH
,
0
,
&
ret
);
return
ret
;
return
ret
;
case
SM_CYSMSIZE
:
case
SM_CYSMSIZE
:
ncm
.
cbSize
=
sizeof
(
ncm
);
SystemParametersInfoW
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
SystemParametersInfoW
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
return
ncm
.
iSmCaptionHeight
;
return
ncm
.
iSmCaptionHeight
;
case
SM_CXMENUSIZE
:
case
SM_CXMENUSIZE
:
get_entry
(
&
entry_MENUWIDTH
,
0
,
&
ret
);
get_entry
(
&
entry_MENUWIDTH
,
0
,
&
ret
);
return
ret
;
return
ret
;
case
SM_CYMENUSIZE
:
case
SM_CYMENUSIZE
:
ncm
.
cbSize
=
sizeof
(
ncm
);
SystemParametersInfoW
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
SystemParametersInfoW
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
return
ncm
.
iMenuHeight
;
return
ncm
.
iMenuHeight
;
case
SM_ARRANGE
:
case
SM_ARRANGE
:
...
@@ -2529,6 +2533,7 @@ INT WINAPI GetSystemMetrics( INT index )
...
@@ -2529,6 +2533,7 @@ INT WINAPI GetSystemMetrics( INT index )
case
SM_CYMENUCHECK
:
case
SM_CYMENUCHECK
:
{
{
TEXTMETRICW
tm
;
TEXTMETRICW
tm
;
ncm
.
cbSize
=
sizeof
(
ncm
);
SystemParametersInfoW
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
SystemParametersInfoW
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
get_text_metr_size
(
get_display_dc
(),
&
ncm
.
lfMenuFont
,
&
tm
,
NULL
);
get_text_metr_size
(
get_display_dc
(),
&
ncm
.
lfMenuFont
,
&
tm
,
NULL
);
return
tm
.
tmHeight
<=
0
?
13
:
((
tm
.
tmHeight
+
tm
.
tmExternalLeading
+
1
)
/
2
)
*
2
-
1
;
return
tm
.
tmHeight
<=
0
?
13
:
((
tm
.
tmHeight
+
tm
.
tmExternalLeading
+
1
)
/
2
)
*
2
-
1
;
...
...
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