Nikolay Sivov : comctl32/treeview: Fix mouse tracking request code.

Alexandre Julliard julliard at winehq.org
Mon Dec 14 09:51:13 CST 2009


Module: wine
Branch: master
Commit: 28d5410596456d8307dfee699c7be7e73eaf5689
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=28d5410596456d8307dfee699c7be7e73eaf5689

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Fri Dec 11 21:11:48 2009 +0300

comctl32/treeview: Fix mouse tracking request code.

After query current tracking state passed parameters could be overwritten,
similar fix for Listview was recently committed.

---

 dlls/comctl32/treeview.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 30699c5..ec1fdbe 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -5280,7 +5280,6 @@ TREEVIEW_MouseMove (TREEVIEW_INFO * infoPtr, LPARAM lParam)
     trackinfo.cbSize = sizeof(TRACKMOUSEEVENT);
     trackinfo.dwFlags = TME_QUERY;
     trackinfo.hwndTrack = infoPtr->hwnd;
-    trackinfo.dwHoverTime = HOVER_DEFAULT;
 
     /* call _TrackMouseEvent to see if we are currently tracking for this hwnd */
     _TrackMouseEvent(&trackinfo);
@@ -5289,6 +5288,9 @@ TREEVIEW_MouseMove (TREEVIEW_INFO * infoPtr, LPARAM lParam)
     if(!(trackinfo.dwFlags & TME_LEAVE))
     {
         trackinfo.dwFlags = TME_LEAVE; /* notify upon leaving */
+        trackinfo.hwndTrack = infoPtr->hwnd;
+        /* do it as fast as possible, minimal systimer latency will be used */
+        trackinfo.dwHoverTime = 1;
 
         /* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */
         /* and can properly deactivate the hot item */




More information about the wine-cvs mailing list