Mikołaj Zalewski : user32: When calling TrackMouseEvent with TME_LEAVE the dwHoverTime may be uninitialized .

Alexandre Julliard julliard at wine.codeweavers.com
Mon Oct 16 13:52:43 CDT 2006


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

Author: Mikołaj Zalewski <mikolaj at zalewski.pl>
Date:   Sat Oct 14 20:16:30 2006 +0200

user32: When calling TrackMouseEvent with TME_LEAVE the dwHoverTime may be uninitialized.

---

 dlls/user/input.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/user/input.c b/dlls/user/input.c
index ae64979..28930ee 100644
--- a/dlls/user/input.c
+++ b/dlls/user/input.c
@@ -921,8 +921,9 @@ TrackMouseEvent (TRACKMOUSEEVENT *ptme)
 
     hover_time = ptme->dwHoverTime;
 
-    /* if HOVER_DEFAULT was specified replace this with the systems current value */
-    if (hover_time == HOVER_DEFAULT || hover_time == 0)
+    /* if HOVER_DEFAULT was specified replace this with the systems current value.
+     * TME_LEAVE doesn't need to specify hover time so use default */
+    if (hover_time == HOVER_DEFAULT || hover_time == 0 || !(ptme->dwHoverTime&TME_HOVER))
         SystemParametersInfoW(SPI_GETMOUSEHOVERTIME, 0, &hover_time, 0);
 
     GetCursorPos(&pos);




More information about the wine-cvs mailing list