Alexander Scott-Johns : user32: Fix read of uninitialized data and a couple of typos in TrackMouseEvent ( Valgrind).

Alexandre Julliard julliard at winehq.org
Thu Feb 17 13:06:35 CST 2011


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

Author: Alexander Scott-Johns <alexander.scott.johns at googlemail.com>
Date:   Wed Feb 16 01:09:35 2011 +0000

user32: Fix read of uninitialized data and a couple of typos in TrackMouseEvent (Valgrind).

---

 dlls/user32/input.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 4fd00ba..162c155 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -1106,11 +1106,11 @@ TrackMouseEvent (TRACKMOUSEEVENT *ptme)
         return FALSE;
     }
 
-    hover_time = ptme->dwHoverTime;
+    hover_time = (ptme->dwFlags & TME_HOVER) ? ptme->dwHoverTime : HOVER_DEFAULT;
 
-    /* if HOVER_DEFAULT was specified replace this with the systems current value.
+    /* if HOVER_DEFAULT was specified replace this with the system's 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))
+    if (hover_time == HOVER_DEFAULT || hover_time == 0)
         SystemParametersInfoW(SPI_GETMOUSEHOVERTIME, 0, &hover_time, 0);
 
     GetCursorPos(&pos);




More information about the wine-cvs mailing list