From 2e72e102a6eb8d3a60fb715c23847251138bcc33 Mon Sep 17 00:00:00 2001 From: Jason Edmeades Date: Tue, 14 Aug 2007 21:48:27 +0100 Subject: [PATCH] comctl32: Fix tooltips uninitialized variables plus wrong positioning. --- dlls/comctl32/tooltips.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 3b41dda66ee..39401eb4f61 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -569,15 +569,18 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) if (style & TTS_BALLOON) { ptfx = rc.left + ((rc.right - rc.left) / 2); - if(rect.top - size.cy >= 0) + + /* CENTERTIP ballon tooltips default to below the field + if they fit on the screen */ + if(rc.bottom + size.cy > GetSystemMetrics(SM_CYSCREEN)) { - rect.top -= size.cy; + rect.top = rc.top - size.cy; infoPtr->bToolBelow = FALSE; } else { infoPtr->bToolBelow = TRUE; - rect.top += 20; + rect.top = rc.bottom; } rect.left = max(0, rect.left - BALLOON_STEMINDENT); }