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
5741ebb8
Commit
5741ebb8
authored
Aug 16, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/pager: Reduce pointer scope so it doesn't point to inner scope vars (PVS-Studio).
parent
badfdaf5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
pager.c
dlls/comctl32/pager.c
+9
-8
No files found.
dlls/comctl32/pager.c
View file @
5741ebb8
...
...
@@ -753,7 +753,7 @@ static LRESULT
PAGER_MouseMove
(
PAGER_INFO
*
infoPtr
,
INT
keys
,
INT
x
,
INT
y
)
{
POINT
clpt
,
pt
;
RECT
wnrect
,
*
btnrect
=
NULL
;
RECT
wnrect
;
BOOL
topLeft
=
FALSE
;
INT
btnstate
=
0
;
INT
hit
;
...
...
@@ -766,8 +766,9 @@ PAGER_MouseMove (PAGER_INFO* infoPtr, INT keys, INT x, INT y)
ClientToScreen
(
infoPtr
->
hwndSelf
,
&
pt
);
GetWindowRect
(
infoPtr
->
hwndSelf
,
&
wnrect
);
if
(
PtInRect
(
&
wnrect
,
pt
))
{
RECT
TLbtnrect
,
BRbtnrect
;
PAGER_GetButtonRects
(
infoPtr
,
&
TLbtnrect
,
&
BRbtnrect
,
FALSE
);
RECT
topleft
,
bottomright
,
*
rect
=
NULL
;
PAGER_GetButtonRects
(
infoPtr
,
&
topleft
,
&
bottomright
,
FALSE
);
clpt
=
pt
;
MapWindowPoints
(
0
,
infoPtr
->
hwndSelf
,
&
clpt
,
1
);
...
...
@@ -775,23 +776,23 @@ PAGER_MouseMove (PAGER_INFO* infoPtr, INT keys, INT x, INT y)
if
((
hit
==
PGB_TOPORLEFT
)
&&
(
infoPtr
->
TLbtnState
==
PGF_NORMAL
))
{
topLeft
=
TRUE
;
btnrect
=
&
TLbtnrec
t
;
rect
=
&
toplef
t
;
infoPtr
->
TLbtnState
=
PGF_HOT
;
btnstate
=
infoPtr
->
TLbtnState
;
}
else
if
((
hit
==
PGB_BOTTOMORRIGHT
)
&&
(
infoPtr
->
BRbtnState
==
PGF_NORMAL
))
{
topLeft
=
FALSE
;
btnrect
=
&
BRbtnrec
t
;
rect
=
&
bottomrigh
t
;
infoPtr
->
BRbtnState
=
PGF_HOT
;
btnstate
=
infoPtr
->
BRbtnState
;
}
/* If in one of the buttons the capture and draw buttons */
if
(
btn
rect
)
if
(
rect
)
{
TRACE
(
"[%p] draw btn (%s), Capture %s, style %08x
\n
"
,
infoPtr
->
hwndSelf
,
wine_dbgstr_rect
(
btn
rect
),
infoPtr
->
hwndSelf
,
wine_dbgstr_rect
(
rect
),
(
infoPtr
->
bCapture
)
?
"TRUE"
:
"FALSE"
,
infoPtr
->
dwStyle
);
if
(
!
infoPtr
->
bCapture
)
...
...
@@ -804,7 +805,7 @@ PAGER_MouseMove (PAGER_INFO* infoPtr, INT keys, INT x, INT y)
SetTimer
(
infoPtr
->
hwndSelf
,
TIMERID1
,
0x3e
,
0
);
hdc
=
GetWindowDC
(
infoPtr
->
hwndSelf
);
/* OffsetRect(wnrect, 0 | 1, 0 | 1) */
PAGER_DrawButton
(
hdc
,
infoPtr
->
clrBk
,
*
btn
rect
,
PAGER_DrawButton
(
hdc
,
infoPtr
->
clrBk
,
*
rect
,
infoPtr
->
dwStyle
&
PGS_HORZ
,
topLeft
,
btnstate
);
ReleaseDC
(
infoPtr
->
hwndSelf
,
hdc
);
return
0
;
...
...
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