From 9ea673a4d830ac816815416fd042160709cb0a89 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Tue, 10 Dec 2002 19:05:12 +0000 Subject: [PATCH] Make WM_MOUSEHOVER coordinates client relative. --- windows/input.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/windows/input.c b/windows/input.c index a7bedd3fc0a..f6bd56194d9 100644 --- a/windows/input.c +++ b/windows/input.c @@ -931,6 +931,7 @@ static void CALLBACK TrackMouseEventProc(HWND hwndUnused, UINT uMsg, UINT_PTR id { int i = 0; POINT pos; + POINT posClient; HWND hwnd; 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? */ 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, - get_key_state(), MAKELPARAM( pos.x, pos.y )); + get_key_state(), MAKELPARAM( posClient.x, posClient.y )); /* stop tracking mouse hover */ TrackingList[i].tme.dwFlags ^= TME_HOVER;