Fix my broken WM_MOUSEHOVER patch [Take 2]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike Hearn (mike@theoretic.com)

ChangeLog:
	- Make WM_MOUSEHOVER coordinates client relative rather than screen
relative

Apologies for the repost, I'd forgotten to update my .cvsrc with the
unified diff option.

Index: windows/input.c
===================================================================
RCS file: /home/wine/wine/windows/input.c,v
retrieving revision 1.87
diff -u -r1.87 input.c
--- windows/input.c	3 Dec 2002 23:34:53 -0000	1.87
+++ windows/input.c	9 Dec 2002 16:57:26 -0000
@@ -931,6 +931,7 @@
 {
     int i = 0;
     POINT pos;
+    POINT posClient;
     HWND hwnd;
     INT hoverwidth = 0, hoverheight = 0;
 
@@ -970,8 +971,11 @@
             /* 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;



-- 
Mike Hearn <m.hearn@signal.qinetiq.com>
QinetiQ - Malvern Technology Center



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux