user32: Fix read of uninitialized data and a couple of typos in TrackMouseEvent ...
authorAlexander Scott-Johns <alexander.scott.johns@googlemail.com>
Wed, 16 Feb 2011 01:09:35 +0000 (01:09 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 17 Feb 2011 17:33:42 +0000 (18:33 +0100)
dlls/user32/input.c

index 4fd00babc58f2db26dc650516e3c82f1c89f805f..162c1557fc6fc0a4878b97714eb7c02a948abe0f 100644 (file)
@@ -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);