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
c565145b
Commit
c565145b
authored
Oct 06, 2015
by
Alex Henrie
Committed by
Alexandre Julliard
Oct 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Remove redundant if (button) statements.
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
parent
18b7ec94
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
toolbar.c
dlls/comctl32/toolbar.c
+7
-10
No files found.
dlls/comctl32/toolbar.c
View file @
c565145b
...
...
@@ -5536,9 +5536,10 @@ TOOLBAR_LButtonDown (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
nHit
=
TOOLBAR_InternalHitTest
(
infoPtr
,
&
pt
,
&
button
);
if
(
button
)
{
btnPtr
=
&
infoPtr
->
buttons
[
nHit
];
if
(
button
&&
bDragKeyPressed
&&
(
infoPtr
->
dwStyle
&
CCS_ADJUSTABLE
))
if
(
bDragKeyPressed
&&
(
infoPtr
->
dwStyle
&
CCS_ADJUSTABLE
))
{
infoPtr
->
nButtonDrag
=
nHit
;
SetCapture
(
infoPtr
->
hwndSelf
);
...
...
@@ -5549,7 +5550,7 @@ TOOLBAR_LButtonDown (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
hCursorDrag
=
LoadCursorW
(
COMCTL32_hModule
,
(
LPCWSTR
)
IDC_MOVEBUTTON
);
SetCursor
(
hCursorDrag
);
}
else
if
(
button
)
else
{
RECT
arrowRect
;
infoPtr
->
nOldHit
=
nHit
;
...
...
@@ -5571,14 +5572,12 @@ TOOLBAR_LButtonDown (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
btnPtr
->
fsState
|=
TBSTATE_PRESSED
;
else
btnPtr
->
bDropDownPressed
=
TRUE
;
RedrawWindow
(
infoPtr
->
hwndSelf
,
&
btnPtr
->
rect
,
0
,
RDW_ERASE
|
RDW_INVALIDATE
|
RDW_UPDATENOW
);
RedrawWindow
(
infoPtr
->
hwndSelf
,
&
btnPtr
->
rect
,
0
,
RDW_ERASE
|
RDW_INVALIDATE
|
RDW_UPDATENOW
);
memset
(
&
nmtb
,
0
,
sizeof
(
nmtb
));
nmtb
.
iItem
=
btnPtr
->
idCommand
;
nmtb
.
rcButton
=
btnPtr
->
rect
;
res
=
TOOLBAR_SendNotify
((
NMHDR
*
)
&
nmtb
,
infoPtr
,
TBN_DROPDOWN
);
res
=
TOOLBAR_SendNotify
((
NMHDR
*
)
&
nmtb
,
infoPtr
,
TBN_DROPDOWN
);
TRACE
(
"TBN_DROPDOWN responded with %ld
\n
"
,
res
);
if
(
res
!=
TBDDRET_TREATPRESSED
)
...
...
@@ -5597,7 +5596,7 @@ TOOLBAR_LButtonDown (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
ScreenToClient
(
infoPtr
->
hwndSelf
,
&
pt
);
nHit
=
TOOLBAR_InternalHitTest
(
infoPtr
,
&
pt
,
&
button
);
if
(
!
infoPtr
->
bAnchor
||
button
)
TOOLBAR_SetHotItemEx
(
infoPtr
,
button
?
nHit
:
TOOLBAR_NOWHERE
,
HICF_MOUSE
|
HICF_LMOUSE
);
TOOLBAR_SetHotItemEx
(
infoPtr
,
nHit
,
HICF_MOUSE
|
HICF_LMOUSE
);
/* remove any left mouse button down or double-click messages
* so that we can get a toggle effect on the button */
...
...
@@ -5615,7 +5614,7 @@ TOOLBAR_LButtonDown (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
btnPtr
->
fsState
|=
TBSTATE_PRESSED
;
TOOLBAR_SetHotItemEx
(
infoPtr
,
button
?
nHit
:
TOOLBAR_NOWHERE
,
HICF_MOUSE
|
HICF_LMOUSE
);
TOOLBAR_SetHotItemEx
(
infoPtr
,
nHit
,
HICF_MOUSE
|
HICF_LMOUSE
);
if
(
btnPtr
->
fsState
&
TBSTATE_ENABLED
)
InvalidateRect
(
infoPtr
->
hwndSelf
,
&
btnPtr
->
rect
,
TRUE
);
...
...
@@ -5623,8 +5622,6 @@ TOOLBAR_LButtonDown (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
SetCapture
(
infoPtr
->
hwndSelf
);
}
if
(
button
)
{
memset
(
&
nmtb
,
0
,
sizeof
(
nmtb
));
nmtb
.
iItem
=
btnPtr
->
idCommand
;
TOOLBAR_SendNotify
((
NMHDR
*
)
&
nmtb
,
infoPtr
,
TBN_BEGINDRAG
);
...
...
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