Commit 7b330516 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

comctl32: Test appropriate tool window for active state.

There is no point in testing owner of the tooltip itself since it's often created as a popup of the desktop window.
parent 48b9ab37
...@@ -991,9 +991,17 @@ TOOLTIPS_CheckTool (const TOOLTIPS_INFO *infoPtr, BOOL bShowTest) ...@@ -991,9 +991,17 @@ TOOLTIPS_CheckTool (const TOOLTIPS_INFO *infoPtr, BOOL bShowTest)
if (nTool == -1) if (nTool == -1)
return -1; return -1;
if (!(GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TTS_ALWAYSTIP) && bShowTest) { if (!(GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TTS_ALWAYSTIP) && bShowTest)
if (!TOOLTIPS_IsWindowActive (GetWindow (infoPtr->hwndSelf, GW_OWNER))) {
return -1; TTTOOL_INFO *ti = &infoPtr->tools[nTool];
HWND hwnd = (ti->uFlags & TTF_IDISHWND) ? (HWND)ti->uId : ti->hwnd;
if (!TOOLTIPS_IsWindowActive(hwnd))
{
TRACE("not active: hwnd %p, parent %p, active %p\n",
hwnd, GetParent(hwnd), GetActiveWindow());
return -1;
}
} }
TRACE("tool %d\n", nTool); TRACE("tool %d\n", nTool);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment