mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:16:04 +00:00
[EXPLORER] Fix the code that requests the taskbar to recalculate the size,
after an icon is removed due to missing owner. Also cleaned up the other case.
This commit is contained in:
parent
74e58d938e
commit
2c8ed37605
1 changed files with 4 additions and 17 deletions
|
@ -391,19 +391,10 @@ private:
|
|||
// Alternatively we could search for them periodically (would waste more resources).
|
||||
TRACE("Destroying icon %d with invalid handle hWnd=%08x\n", notifyItem->uID, notifyItem->hWnd);
|
||||
|
||||
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));
|
||||
HWND parentHWND = ::GetParent(::GetParent(GetParent()));
|
||||
::SendMessage(parentHWND, WM_SIZE, 0, 0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -588,12 +579,7 @@ public:
|
|||
{
|
||||
SYS_PAGER_COPY_DATA * data;
|
||||
NOTIFYICONDATA *iconData;
|
||||
HWND parentHWND;
|
||||
RECT windowRect;
|
||||
BOOL ret = FALSE;
|
||||
parentHWND = GetParent();
|
||||
parentHWND = ::GetParent(parentHWND);
|
||||
::GetClientRect(parentHWND, &windowRect);
|
||||
|
||||
int VisibleButtonCount = Toolbar.GetVisibleButtonCount();
|
||||
|
||||
|
@ -619,7 +605,8 @@ public:
|
|||
|
||||
if (VisibleButtonCount != Toolbar.GetVisibleButtonCount())
|
||||
{
|
||||
SendMessage(parentHWND, WM_SIZE, 0, 0);
|
||||
HWND parentHWND = ::GetParent(GetParent());
|
||||
::SendMessage(parentHWND, WM_SIZE, 0, 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue