Module: wine Branch: master Commit: c98bed32d85e9c645b8381905f34d6a3b5398a2e URL: https://source.winehq.org/git/wine.git/?a=commit;h=c98bed32d85e9c645b8381905...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Thu Dec 21 02:05:09 2017 +0300
comctl32/tooltips: Reset window subclass data when removing tools.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/comctl32/tooltips.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 405b1e9..1c8cb66 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -1142,6 +1142,13 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW) return TRUE; }
+static void TOOLTIPS_ResetSubclass (const TTTOOL_INFO *toolPtr) +{ + /* Reset subclassing data. */ + if (toolPtr->uInternalFlags & TTF_SUBCLASS) + SetWindowSubclass(toolPtr->uInternalFlags & TTF_IDISHWND ? (HWND)toolPtr->uId : toolPtr->hwnd, + TOOLTIPS_SubclassProc, 1, 0); +}
static LRESULT TOOLTIPS_DelToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW) @@ -1174,15 +1181,7 @@ TOOLTIPS_DelToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW) Free (toolPtr->lpszText); }
- /* remove subclassing */ - if (toolPtr->uInternalFlags & TTF_SUBCLASS) { - if (toolPtr->uInternalFlags & TTF_IDISHWND) { - RemoveWindowSubclass((HWND)toolPtr->uId, TOOLTIPS_SubclassProc, 1); - } - else { - RemoveWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1); - } - } + TOOLTIPS_ResetSubclass (toolPtr);
/* delete tool from tool list */ if (infoPtr->uNumTools == 1) { @@ -1888,10 +1887,7 @@ TOOLTIPS_Destroy (TOOLTIPS_INFO *infoPtr) } }
- /* Reset subclassing data. */ - if (toolPtr->uInternalFlags & TTF_SUBCLASS) - SetWindowSubclass(toolPtr->uInternalFlags & TTF_IDISHWND ? (HWND)toolPtr->uId : toolPtr->hwnd, - TOOLTIPS_SubclassProc, 1, 0); + TOOLTIPS_ResetSubclass (toolPtr); }
Free (infoPtr->tools);