[PATCH] comctl32: Preserve tooltip size set by TTN_SHOW.

Roman Pišl rpisl at seznam.cz
Fri Feb 23 11:51:48 CST 2018


Fixes https://bugs.winehq.org/show_bug.cgi?id=14336.

Signed-off-by: Roman Pišl <rpisl at seznam.cz>
---
 dlls/comctl32/tooltips.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index 12f2d4b81c..c0c020b7fc 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -634,7 +634,13 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate)
 
     TRACE("%s\n", debugstr_w(infoPtr->szTipText));
 
-    TOOLTIPS_CalcTipSize (infoPtr, &size);
+    GetWindowRect(infoPtr->hwndSelf, &rect);
+    size.cx = rect.right - rect.left;
+    size.cy = rect.bottom - rect.top;
+    if (size.cx <= 0 || size.cy <= 0)
+    {
+        TOOLTIPS_CalcTipSize (infoPtr, &size);
+    }
     TRACE("size %d x %d\n", size.cx, size.cy);
 
     if (track_activate && (toolPtr->uFlags & TTF_TRACK))
-- 
2.16.1




More information about the wine-devel mailing list