[EXPLORER]

Remove notification icons when their attached HWND is no longer valid. Patch by Joachim Henze (reactosfanboy), with some extra newlines by me.
CORE-9537 #resolve

svn path=/trunk/; revision=67583
This commit is contained in:
David Quintana 2015-05-06 22:13:06 +00:00
parent 9e03420395
commit f6f2e8dbac

View file

@ -256,7 +256,27 @@ private:
NOTIFYICONDATA * notifyItem = GetItemData(wIndex);
if (!::IsWindow(notifyItem->hWnd))
{
// We detect and destroy icons with invalid handles only on mouse move over systray, same as MS does.
// Alternatively we could search for them periodically (would waste more resources).
TRACE("destroying icon with invalid handle\n");
HWND parentHWND = GetParent();
parentHWND = ::GetParent(parentHWND);
RECT windowRect;
::GetClientRect(parentHWND, &windowRect);
RemoveButton(notifyItem);
SendMessage(parentHWND,
WM_SIZE,
0,
MAKELONG(windowRect.right - windowRect.left,
windowRect.bottom - windowRect.top));
return;
}
if (uMsg >= WM_MOUSEFIRST && uMsg <= WM_MOUSELAST)
{