Nikolay Sivov : comctl32/tooltips: Set current tool before sending TTN_NEEDTEXT.
Alexandre Julliard
julliard at winehq.org
Mon Sep 11 15:07:59 CDT 2017
Module: wine
Branch: master
Commit: 6bbea5d074e9543856f5b9cd734bd6716179bf52
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6bbea5d074e9543856f5b9cd734bd6716179bf52
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Sep 11 12:40:04 2017 +0300
comctl32/tooltips: Set current tool before sending TTN_NEEDTEXT.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/tooltips.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index 41146f1..030e775 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -588,7 +588,7 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate)
NMHDR hdr;
int ptfx = 0;
DWORD style = GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE);
- INT nTool;
+ INT nTool, current;
if (track_activate)
{
@@ -611,16 +611,20 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate)
TRACE("Show tooltip pre %d! (%p)\n", nTool, infoPtr->hwndSelf);
+ current = infoPtr->nCurrentTool;
+ if (!track_activate)
+ infoPtr->nCurrentTool = infoPtr->nTool;
+
TOOLTIPS_GetTipText (infoPtr, nTool, infoPtr->szTipText);
if (infoPtr->szTipText[0] == '\0')
+ {
+ infoPtr->nCurrentTool = current;
return;
+ }
toolPtr = &infoPtr->tools[nTool];
- if (!track_activate)
- infoPtr->nCurrentTool = infoPtr->nTool;
-
TRACE("Show tooltip %d!\n", nTool);
hdr.hwndFrom = infoPtr->hwndSelf;
More information about the wine-cvs
mailing list