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
b18e1586
Commit
b18e1586
authored
Aug 25, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Aug 25, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Send NM_LDOWN notification.
- NM_RDBLCLK only needs to send a NMHDR structure. - On mouse notifications returning 0 DefWndProc should be called.
parent
ead9e564
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
29 deletions
+43
-29
toolbar.c
dlls/comctl32/toolbar.c
+43
-29
No files found.
dlls/comctl32/toolbar.c
View file @
b18e1586
...
...
@@ -5386,6 +5386,7 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
POINT
pt
;
INT
nHit
;
NMTOOLBARA
nmtb
;
NMMOUSE
nmmouse
;
BOOL
bDragKeyPressed
;
TRACE
(
"
\n
"
);
...
...
@@ -5506,6 +5507,23 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_SendNotify
((
NMHDR
*
)
&
nmtb
,
infoPtr
,
TBN_BEGINDRAG
);
}
nmmouse
.
dwHitInfo
=
nHit
;
/* !!! Undocumented - sends NM_LDOWN with the NMMOUSE structure. */
if
(
nmmouse
.
dwHitInfo
<
0
)
nmmouse
.
dwItemSpec
=
-
1
;
else
{
nmmouse
.
dwItemSpec
=
infoPtr
->
buttons
[
nmmouse
.
dwHitInfo
].
idCommand
;
nmmouse
.
dwItemData
=
infoPtr
->
buttons
[
nmmouse
.
dwHitInfo
].
dwData
;
}
ClientToScreen
(
hwnd
,
&
pt
);
nmmouse
.
pt
=
pt
;
if
(
!
TOOLBAR_SendNotify
((
LPNMHDR
)
&
nmmouse
,
infoPtr
,
NM_LDOWN
))
return
DefWindowProcW
(
hwnd
,
WM_LBUTTONDOWN
,
wParam
,
lParam
);
return
0
;
}
...
...
@@ -5653,16 +5671,27 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
SendMessageA
(
infoPtr
->
hwndNotify
,
WM_COMMAND
,
MAKEWPARAM
(
infoPtr
->
buttons
[
nHit
].
idCommand
,
0
),
(
LPARAM
)
hwnd
);
}
}
/* !!! Undocumented - toolbar at 4.71 level and above sends
* either NM_RCLICK or NM_CLICK with the NMMOUSE structure.
* Only NM_RCLICK is documented.
*/
nmmouse
.
dwItemSpec
=
btnPtr
->
idCommand
;
nmmouse
.
dwItemData
=
btnPtr
->
dwData
;
TOOLBAR_SendNotify
((
NMHDR
*
)
&
nmmouse
,
infoPtr
,
NM_CLICK
);
}
/* !!! Undocumented - toolbar at 4.71 level and above sends
* NM_CLICK with the NMMOUSE structure. */
nmmouse
.
dwHitInfo
=
nHit
;
if
(
nmmouse
.
dwHitInfo
<
0
)
nmmouse
.
dwItemSpec
=
-
1
;
else
{
nmmouse
.
dwItemSpec
=
infoPtr
->
buttons
[
nmmouse
.
dwHitInfo
].
idCommand
;
nmmouse
.
dwItemData
=
infoPtr
->
buttons
[
nmmouse
.
dwHitInfo
].
dwData
;
}
ClientToScreen
(
hwnd
,
&
pt
);
nmmouse
.
pt
=
pt
;
if
(
!
TOOLBAR_SendNotify
((
LPNMHDR
)
&
nmmouse
,
infoPtr
,
NM_CLICK
))
return
DefWindowProcW
(
hwnd
,
WM_LBUTTONUP
,
wParam
,
lParam
);
return
0
;
}
...
...
@@ -5687,9 +5716,10 @@ TOOLBAR_RButtonUp( HWND hwnd, WPARAM wParam, LPARAM lParam)
}
ClientToScreen
(
hwnd
,
&
pt
);
memcpy
(
&
nmmouse
.
pt
,
&
pt
,
sizeof
(
POINT
))
;
nmmouse
.
pt
=
pt
;
TOOLBAR_SendNotify
((
LPNMHDR
)
&
nmmouse
,
infoPtr
,
NM_RCLICK
);
if
(
!
TOOLBAR_SendNotify
((
LPNMHDR
)
&
nmmouse
,
infoPtr
,
NM_RCLICK
))
return
DefWindowProcW
(
hwnd
,
WM_RBUTTONUP
,
wParam
,
lParam
);
return
0
;
}
...
...
@@ -5698,26 +5728,10 @@ static LRESULT
TOOLBAR_RButtonDblClk
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
NMHDR
nmhdr
;
NMMOUSE
nmmouse
;
POINT
pt
;
pt
.
x
=
LOWORD
(
lParam
);
pt
.
y
=
HIWORD
(
lParam
);
nmmouse
.
dwHitInfo
=
TOOLBAR_InternalHitTest
(
hwnd
,
&
pt
);
if
(
nmmouse
.
dwHitInfo
<
0
)
nmmouse
.
dwItemSpec
=
-
1
;
else
{
nmmouse
.
dwItemSpec
=
infoPtr
->
buttons
[
nmmouse
.
dwHitInfo
].
idCommand
;
nmmouse
.
dwItemData
=
infoPtr
->
buttons
[
nmmouse
.
dwHitInfo
].
dwData
;
}
ClientToScreen
(
hwnd
,
&
pt
);
memcpy
(
&
nmmouse
.
pt
,
&
pt
,
sizeof
(
POINT
));
TOOLBAR_SendNotify
((
LPNMHDR
)
&
nmmouse
,
infoPtr
,
NM_RDBLCLK
);
if
(
!
TOOLBAR_SendNotify
(
&
nmhdr
,
infoPtr
,
NM_RDBLCLK
))
return
DefWindowProcW
(
hwnd
,
WM_RBUTTONDBLCLK
,
wParam
,
lParam
);
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