mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 20:28:26 +00:00
Make WM_MOUSEHOVER coordinates client relative.
This commit is contained in:
parent
31e4629085
commit
9ea673a4d8
|
@ -931,6 +931,7 @@ static void CALLBACK TrackMouseEventProc(HWND hwndUnused, UINT uMsg, UINT_PTR id
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
POINT pos;
|
POINT pos;
|
||||||
|
POINT posClient;
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
INT hoverwidth = 0, hoverheight = 0;
|
INT hoverwidth = 0, hoverheight = 0;
|
||||||
|
|
||||||
|
@ -970,8 +971,11 @@ static void CALLBACK TrackMouseEventProc(HWND hwndUnused, UINT uMsg, UINT_PTR id
|
||||||
/* has the mouse hovered long enough? */
|
/* has the mouse hovered long enough? */
|
||||||
if(TrackingList[i].iHoverTime <= TrackingList[i].tme.dwHoverTime)
|
if(TrackingList[i].iHoverTime <= TrackingList[i].tme.dwHoverTime)
|
||||||
{
|
{
|
||||||
|
posClient.x = pos.x;
|
||||||
|
posClient.y = pos.y;
|
||||||
|
ScreenToClient(hwnd, &posClient);
|
||||||
PostMessageW(TrackingList[i].tme.hwndTrack, WM_MOUSEHOVER,
|
PostMessageW(TrackingList[i].tme.hwndTrack, WM_MOUSEHOVER,
|
||||||
get_key_state(), MAKELPARAM( pos.x, pos.y ));
|
get_key_state(), MAKELPARAM( posClient.x, posClient.y ));
|
||||||
|
|
||||||
/* stop tracking mouse hover */
|
/* stop tracking mouse hover */
|
||||||
TrackingList[i].tme.dwFlags ^= TME_HOVER;
|
TrackingList[i].tme.dwFlags ^= TME_HOVER;
|
||||||
|
|
Loading…
Reference in a new issue