Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7cca8563
Commit
7cca8563
authored
Oct 25, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Properly handle negative coordinates for mouse events.
parent
11f4fb2d
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
59 additions
and
57 deletions
+59
-57
header.c
dlls/comctl32/header.c
+6
-6
monthcal.c
dlls/comctl32/monthcal.c
+8
-8
rebar.c
dlls/comctl32/rebar.c
+2
-2
status.c
dlls/comctl32/status.c
+4
-4
syslink.c
dlls/comctl32/syslink.c
+6
-6
tab.c
dlls/comctl32/tab.c
+8
-8
theme_combo.c
dlls/comctl32/theme_combo.c
+4
-2
toolbar.c
dlls/comctl32/toolbar.c
+17
-17
tooltips.c
dlls/comctl32/tooltips.c
+2
-2
treeview.c
dlls/comctl32/treeview.c
+2
-2
No files found.
dlls/comctl32/header.c
View file @
7cca8563
...
...
@@ -1555,8 +1555,8 @@ HEADER_LButtonDblClk (HWND hwnd, WPARAM wParam, LPARAM lParam)
UINT
flags
;
INT
nItem
;
pt
.
x
=
(
INT
)
LOWORD
(
lParam
);
pt
.
y
=
(
INT
)
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
HEADER_InternalHitTest
(
hwnd
,
&
pt
,
&
flags
,
&
nItem
);
if
((
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
HDS_BUTTONS
)
&&
(
flags
==
HHT_ONHEADER
))
...
...
@@ -1578,8 +1578,8 @@ HEADER_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
INT
nItem
;
HDC
hdc
;
pt
.
x
=
(
INT
)
LOWORD
(
lParam
);
pt
.
y
=
(
INT
)
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
HEADER_InternalHitTest
(
hwnd
,
&
pt
,
&
flags
,
&
nItem
);
if
((
dwStyle
&
HDS_BUTTONS
)
&&
(
flags
==
HHT_ONHEADER
))
{
...
...
@@ -1905,8 +1905,8 @@ HEADER_RButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
BOOL
bRet
;
POINT
pt
;
pt
.
x
=
LOWORD
(
lParam
);
pt
.
y
=
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
/* Send a Notify message */
bRet
=
HEADER_SendSimpleNotify
(
hwnd
,
NM_RCLICK
);
...
...
dlls/comctl32/monthcal.c
View file @
7cca8563
...
...
@@ -1342,8 +1342,8 @@ MONTHCAL_RButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
strcpyW
(
buf
,
todayW
);
}
AppendMenuW
(
hMenu
,
MF_STRING
|
MF_ENABLED
,
1
,
buf
);
menupoint
.
x
=
(
INT
)
LOWORD
(
lParam
);
menupoint
.
y
=
(
INT
)
HIWORD
(
lParam
);
menupoint
.
x
=
(
short
)
LOWORD
(
lParam
);
menupoint
.
y
=
(
short
)
HIWORD
(
lParam
);
ClientToScreen
(
infoPtr
->
hwndSelf
,
&
menupoint
);
if
(
TrackPopupMenu
(
hMenu
,
TPM_RIGHTBUTTON
|
TPM_NONOTIFY
|
TPM_RETURNCMD
,
menupoint
.
x
,
menupoint
.
y
,
0
,
infoPtr
->
hwndSelf
,
NULL
))
...
...
@@ -1387,8 +1387,8 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
FALSE
);
}
ht
.
pt
.
x
=
(
INT
)
LOWORD
(
lParam
);
ht
.
pt
.
y
=
(
INT
)
HIWORD
(
lParam
);
ht
.
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
ht
.
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
hit
=
MONTHCAL_HitTest
(
infoPtr
,
(
LPARAM
)
&
ht
);
/* FIXME: these flags should be checked by */
...
...
@@ -1524,8 +1524,8 @@ MONTHCAL_LButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam)
redraw
=
TRUE
;
}
ht
.
pt
.
x
=
(
INT
)
LOWORD
(
lParam
);
ht
.
pt
.
y
=
(
INT
)
HIWORD
(
lParam
);
ht
.
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
ht
.
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
hit
=
MONTHCAL_HitTest
(
infoPtr
,
(
LPARAM
)
&
ht
);
infoPtr
->
status
=
MC_SEL_LBUTUP
;
...
...
@@ -1602,8 +1602,8 @@ MONTHCAL_MouseMove(MONTHCAL_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
if
(
!
(
infoPtr
->
status
&
MC_SEL_LBUTDOWN
))
return
0
;
ht
.
pt
.
x
=
LOWORD
(
lParam
);
ht
.
pt
.
y
=
HIWORD
(
lParam
);
ht
.
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
ht
.
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
hit
=
MONTHCAL_HitTest
(
infoPtr
,
(
LPARAM
)
&
ht
);
...
...
dlls/comctl32/rebar.c
View file @
7cca8563
...
...
@@ -3933,8 +3933,8 @@ REBAR_LButtonDown (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
UINT
htFlags
;
INT
iHitBand
;
POINT
ptMouseDown
;
ptMouseDown
.
x
=
(
INT
)
LOWORD
(
lParam
);
ptMouseDown
.
y
=
(
INT
)
HIWORD
(
lParam
);
ptMouseDown
.
x
=
(
short
)
LOWORD
(
lParam
);
ptMouseDown
.
y
=
(
short
)
HIWORD
(
lParam
);
REBAR_InternalHitTest
(
infoPtr
,
&
ptMouseDown
,
&
htFlags
,
&
iHitBand
);
lpBand
=
&
infoPtr
->
bands
[
iHitBand
];
...
...
dlls/comctl32/status.c
View file @
7cca8563
...
...
@@ -367,8 +367,8 @@ STATUSBAR_Relay2Tip (STATUS_INFO *infoPtr, UINT uMsg,
msg
.
wParam
=
wParam
;
msg
.
lParam
=
lParam
;
msg
.
time
=
GetMessageTime
();
msg
.
pt
.
x
=
LOWORD
(
GetMessagePos
());
msg
.
pt
.
y
=
HIWORD
(
GetMessagePos
());
msg
.
pt
.
x
=
(
short
)
LOWORD
(
GetMessagePos
());
msg
.
pt
.
y
=
(
short
)
HIWORD
(
GetMessagePos
());
return
SendMessageW
(
infoPtr
->
hwndToolTip
,
TTM_RELAYEVENT
,
0
,
(
LPARAM
)
&
msg
);
}
...
...
@@ -1330,8 +1330,8 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return
STATUSBAR_Relay2Tip
(
infoPtr
,
msg
,
wParam
,
lParam
);
case
WM_NCHITTEST
:
res
=
STATUSBAR_WMNCHitTest
(
infoPtr
,
(
INT
)
LOWORD
(
lParam
),
(
INT
)
HIWORD
(
lParam
));
res
=
STATUSBAR_WMNCHitTest
(
infoPtr
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
));
if
(
res
!=
HTERROR
)
return
res
;
return
DefWindowProcW
(
hwnd
,
msg
,
wParam
,
lParam
);
...
...
dlls/comctl32/syslink.c
View file @
7cca8563
...
...
@@ -1580,15 +1580,15 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
case
WM_LBUTTONDOWN
:
{
POINT
pt
;
pt
.
x
=
LOWORD
(
lParam
);
pt
.
y
=
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
return
SYSLINK_LButtonDown
(
infoPtr
,
wParam
,
&
pt
);
}
case
WM_LBUTTONUP
:
{
POINT
pt
;
pt
.
x
=
LOWORD
(
lParam
);
pt
.
y
=
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
return
SYSLINK_LButtonUp
(
infoPtr
,
wParam
,
&
pt
);
}
...
...
@@ -1639,8 +1639,8 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
{
POINT
pt
;
RECT
rc
;
pt
.
x
=
LOWORD
(
lParam
);
pt
.
y
=
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
GetClientRect
(
infoPtr
->
Self
,
&
rc
);
ScreenToClient
(
infoPtr
->
Self
,
&
pt
);
...
...
dlls/comctl32/tab.c
View file @
7cca8563
...
...
@@ -193,8 +193,8 @@ TAB_RelayEvent (HWND hwndTip, HWND hwndMsg, UINT uMsg,
msg
.
wParam
=
wParam
;
msg
.
lParam
=
lParam
;
msg
.
time
=
GetMessageTime
();
msg
.
pt
.
x
=
LOWORD
(
GetMessagePos
());
msg
.
pt
.
y
=
HIWORD
(
GetMessagePos
());
msg
.
pt
.
x
=
(
short
)
LOWORD
(
GetMessagePos
());
msg
.
pt
.
y
=
(
short
)
HIWORD
(
GetMessagePos
());
SendMessageW
(
hwndTip
,
TTM_RELAYEVENT
,
0
,
(
LPARAM
)
&
msg
);
}
...
...
@@ -589,8 +589,8 @@ TAB_NCHitTest (TAB_INFO *infoPtr, LPARAM lParam)
POINT
pt
;
UINT
dummyflag
;
pt
.
x
=
LOWORD
(
lParam
);
pt
.
y
=
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
ScreenToClient
(
infoPtr
->
hwnd
,
&
pt
);
if
(
TAB_InternalHitTest
(
infoPtr
,
pt
,
&
dummyflag
)
==
-
1
)
...
...
@@ -618,8 +618,8 @@ TAB_LButtonDown (TAB_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
TAB_RelayEvent
(
infoPtr
->
hwndToolTip
,
infoPtr
->
hwnd
,
WM_LBUTTONDOWN
,
wParam
,
lParam
);
pt
.
x
=
(
INT
)
LOWORD
(
lParam
);
pt
.
y
=
(
INT
)
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
newItem
=
TAB_InternalHitTest
(
infoPtr
,
pt
,
&
dummy
);
...
...
@@ -790,8 +790,8 @@ TAB_RecalcHotTrack
}
else
{
pt
.
x
=
LOWORD
(
*
pos
);
pt
.
y
=
HIWORD
(
*
pos
);
pt
.
x
=
(
short
)
LOWORD
(
*
pos
);
pt
.
y
=
(
short
)
HIWORD
(
*
pos
);
}
item
=
TAB_InternalHitTest
(
infoPtr
,
pt
,
&
flags
);
...
...
dlls/comctl32/theme_combo.c
View file @
7cca8563
...
...
@@ -280,8 +280,10 @@ LRESULT CALLBACK THEMING_ComboSubclassProc (HWND hwnd, UINT msg,
{
/* Dropdown button hot-tracking */
COMBOBOXINFO
cbi
;
POINT
pt
=
{
LOWORD
(
lParam
),
HIWORD
(
lParam
)};
POINT
pt
;
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
cbi
.
cbSize
=
sizeof
(
cbi
);
SendMessageW
(
hwnd
,
CB_GETCOMBOBOXINFO
,
0
,
(
LPARAM
)
&
cbi
);
...
...
dlls/comctl32/toolbar.c
View file @
7cca8563
...
...
@@ -1887,8 +1887,8 @@ TOOLBAR_RelayEvent (HWND hwndTip, HWND hwndMsg, UINT uMsg,
msg
.
wParam
=
wParam
;
msg
.
lParam
=
lParam
;
msg
.
time
=
GetMessageTime
();
msg
.
pt
.
x
=
LOWORD
(
GetMessagePos
());
msg
.
pt
.
y
=
HIWORD
(
GetMessagePos
());
msg
.
pt
.
x
=
(
short
)
LOWORD
(
GetMessagePos
());
msg
.
pt
.
y
=
(
short
)
HIWORD
(
GetMessagePos
());
SendMessageW
(
hwndTip
,
TTM_RELAYEVENT
,
0
,
(
LPARAM
)
&
msg
);
}
...
...
@@ -4601,7 +4601,7 @@ static LRESULT
TOOLBAR_SetButtonSize
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
INT
cx
=
LOWORD
(
lParam
),
cy
=
HIWORD
(
lParam
);
INT
cx
=
(
short
)
LOWORD
(
lParam
),
cy
=
(
short
)
HIWORD
(
lParam
);
if
((
cx
<
0
)
||
(
cy
<
0
))
{
...
...
@@ -4634,16 +4634,16 @@ TOOLBAR_SetButtonWidth (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
/* if setting to current values, ignore */
if
((
infoPtr
->
cxMin
==
(
INT
)
LOWORD
(
lParam
))
&&
(
infoPtr
->
cxMax
==
(
INT
)
HIWORD
(
lParam
)))
{
if
((
infoPtr
->
cxMin
==
(
short
)
LOWORD
(
lParam
))
&&
(
infoPtr
->
cxMax
==
(
short
)
HIWORD
(
lParam
)))
{
TRACE
(
"matches current width, min=%d, max=%d, no recalc
\n
"
,
infoPtr
->
cxMin
,
infoPtr
->
cxMax
);
return
TRUE
;
}
/* save new values */
infoPtr
->
cxMin
=
(
INT
)
LOWORD
(
lParam
);
infoPtr
->
cxMax
=
(
INT
)
HIWORD
(
lParam
);
infoPtr
->
cxMin
=
(
short
)
LOWORD
(
lParam
);
infoPtr
->
cxMax
=
(
short
)
HIWORD
(
lParam
);
/* otherwise we need to recalc the toolbar and in some cases
recalc the bounding rectangle (does DrawText w/ DT_CALCRECT
...
...
@@ -5598,8 +5598,8 @@ TOOLBAR_LButtonDblClk (HWND hwnd, WPARAM wParam, LPARAM lParam)
POINT
pt
;
INT
nHit
;
pt
.
x
=
(
INT
)
LOWORD
(
lParam
);
pt
.
y
=
(
INT
)
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
nHit
=
TOOLBAR_InternalHitTest
(
hwnd
,
&
pt
);
if
(
nHit
>=
0
)
...
...
@@ -5633,8 +5633,8 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_RelayEvent
(
infoPtr
->
hwndToolTip
,
hwnd
,
WM_LBUTTONDOWN
,
wParam
,
lParam
);
pt
.
x
=
(
INT
)
LOWORD
(
lParam
);
pt
.
y
=
(
INT
)
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
nHit
=
TOOLBAR_InternalHitTest
(
hwnd
,
&
pt
);
btnPtr
=
&
infoPtr
->
buttons
[
nHit
];
...
...
@@ -5769,8 +5769,8 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_RelayEvent
(
infoPtr
->
hwndToolTip
,
hwnd
,
WM_LBUTTONUP
,
wParam
,
lParam
);
pt
.
x
=
(
INT
)
LOWORD
(
lParam
);
pt
.
y
=
(
INT
)
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
nHit
=
TOOLBAR_InternalHitTest
(
hwnd
,
&
pt
);
if
(
!
infoPtr
->
bAnchor
||
(
nHit
>=
0
))
...
...
@@ -5922,8 +5922,8 @@ TOOLBAR_RButtonUp( HWND hwnd, WPARAM wParam, LPARAM lParam)
NMMOUSE
nmmouse
;
POINT
pt
;
pt
.
x
=
LOWORD
(
lParam
);
pt
.
y
=
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
nHit
=
TOOLBAR_InternalHitTest
(
hwnd
,
&
pt
);
nmmouse
.
dwHitInfo
=
nHit
;
...
...
@@ -6059,8 +6059,8 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_RelayEvent
(
infoPtr
->
hwndToolTip
,
hwnd
,
WM_MOUSEMOVE
,
wParam
,
lParam
);
pt
.
x
=
(
INT
)
LOWORD
(
lParam
);
pt
.
y
=
(
INT
)
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
nHit
=
TOOLBAR_InternalHitTest
(
hwnd
,
&
pt
);
...
...
dlls/comctl32/tooltips.c
View file @
7cca8563
...
...
@@ -1794,8 +1794,8 @@ TOOLTIPS_RelayEvent (HWND hwnd, WPARAM wParam, LPARAM lParam)
break
;
case
WM_MOUSEMOVE
:
pt
.
x
=
LOWORD
(
lpMsg
->
lParam
);
pt
.
y
=
HIWORD
(
lpMsg
->
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lpMsg
->
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lpMsg
->
lParam
);
nOldTool
=
infoPtr
->
nTool
;
infoPtr
->
nTool
=
TOOLTIPS_GetToolFromPoint
(
infoPtr
,
lpMsg
->
hwnd
,
&
pt
);
...
...
dlls/comctl32/treeview.c
View file @
7cca8563
...
...
@@ -5203,8 +5203,8 @@ TREEVIEW_MouseMove (TREEVIEW_INFO * infoPtr, WPARAM wParam, LPARAM lParam)
_TrackMouseEvent
(
&
trackinfo
);
}
pt
.
x
=
(
INT
)
LOWORD
(
lParam
);
pt
.
y
=
(
INT
)
HIWORD
(
lParam
);
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
item
=
TREEVIEW_HitTestPoint
(
infoPtr
,
pt
);
...
...
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