From 27a76c84733f1ebf13a5623def67671e59126663 Mon Sep 17 00:00:00 2001 From: Francois Jacques Date: Thu, 7 Sep 2000 18:38:12 +0000 Subject: [PATCH] - Make sure tooltips are hidden before deleting them. - Glitch happened while moving from a tooltip to another (fixed). --- dlls/comctl32/tooltips.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 98328d3bc5f..019ed82d28d 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -880,6 +880,9 @@ TOOLTIPS_DelToolA (HWND hwnd, WPARAM wParam, LPARAM lParam) TRACE("tool %d\n", nTool); + /* make sure the tooltip has disappeared before deleting it */ + TOOLTIPS_Hide(hwnd, infoPtr); + /* delete text string */ toolPtr = &infoPtr->tools[nTool]; if ((toolPtr->hinst) && (toolPtr->lpszText)) { @@ -941,8 +944,15 @@ TOOLTIPS_DelToolA (HWND hwnd, WPARAM wParam, LPARAM lParam) COMCTL32_Free (oldTools); } + /* destroying tool that mouse was on on last relayed mouse move */ + if (infoPtr->nTool == nTool) + { + /* no current tool (0 means first tool) */ + infoPtr->nTool = -1; + } + infoPtr->uNumTools--; - + return 0; } @@ -967,6 +977,9 @@ TOOLTIPS_DelToolW (HWND hwnd, WPARAM wParam, LPARAM lParam) TRACE("tool %d\n", nTool); + /* make sure the tooltip has disappeared before deleting it */ + TOOLTIPS_Hide(hwnd, infoPtr); + /* delete text string */ toolPtr = &infoPtr->tools[nTool]; if ((toolPtr->hinst) && (toolPtr->lpszText)) { @@ -1028,8 +1041,15 @@ TOOLTIPS_DelToolW (HWND hwnd, WPARAM wParam, LPARAM lParam) COMCTL32_Free (oldTools); } + /* destroying tool that mouse was on on last relayed mouse move */ + if (infoPtr->nTool == nTool) + { + /* no current tool (0 means first tool) */ + infoPtr->nTool = -1; + } + infoPtr->uNumTools--; - + return 0; }