mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:35:43 +00:00
[0.4.10][EXPLORER] systray notification area - icon crosstalk on NIS_SHARED or NIS_HIDDEN CORE-14262
Fixes a regression introduced by SVN r68893 == git 332652615a
Symptom "TightVNC Server may show a doubled icon and/or corrupts its neighbor icon in the systray"
Fix picked from 0.4.13-dev-481-g8d6c9e8
------------------
I allowed myself to also port the fix for some TRACE-loggings missing ending "\n".
That second regression was introduced during 0.4.8-dev'ing when substantial parts of this code
were moved from trayntfy.cpp into syspager.cpp.
releases/0.4.7 was not affected by that yet.
That 2nd fix was picked from 0.4.13-dev-480-g7796df3
This commit is contained in:
parent
f188ff4af8
commit
8018bb2eea
1 changed files with 6 additions and 5 deletions
|
@ -444,14 +444,14 @@ UINT WINAPI CIconWatcher::WatcherThread(_In_opt_ LPVOID lpParam)
|
||||||
{
|
{
|
||||||
// We've been kicked, we have updates to our list (or we're exiting the thread)
|
// We've been kicked, we have updates to our list (or we're exiting the thread)
|
||||||
if (This->m_Loop)
|
if (This->m_Loop)
|
||||||
TRACE("Updating watched icon list");
|
TRACE("Updating watched icon list\n");
|
||||||
}
|
}
|
||||||
else if ((Status >= WAIT_OBJECT_0 + 1) && (Status < Size))
|
else if ((Status >= WAIT_OBJECT_0 + 1) && (Status < Size))
|
||||||
{
|
{
|
||||||
IconWatcherData *Icon;
|
IconWatcherData *Icon;
|
||||||
Icon = This->GetListEntry(NULL, WatchList[Status], false);
|
Icon = This->GetListEntry(NULL, WatchList[Status], false);
|
||||||
|
|
||||||
TRACE("Pid %lu owns a notification icon and has stopped without deleting it. We'll cleanup on its behalf", Icon->ProcessId);
|
TRACE("Pid %lu owns a notification icon and has stopped without deleting it. We'll cleanup on its behalf\n", Icon->ProcessId);
|
||||||
|
|
||||||
TRAYNOTIFYDATAW tnid = {0};
|
TRAYNOTIFYDATAW tnid = {0};
|
||||||
tnid.dwSignature = NI_NOTIFY_SIG;
|
tnid.dwSignature = NI_NOTIFY_SIG;
|
||||||
|
@ -737,6 +737,7 @@ BOOL CNotifyToolbar::AddButton(_In_ CONST NOTIFYICONDATA *iconData)
|
||||||
tbBtn.dwData = (DWORD_PTR)notifyItem;
|
tbBtn.dwData = (DWORD_PTR)notifyItem;
|
||||||
tbBtn.iString = (INT_PTR) text;
|
tbBtn.iString = (INT_PTR) text;
|
||||||
tbBtn.idCommand = GetButtonCount();
|
tbBtn.idCommand = GetButtonCount();
|
||||||
|
tbBtn.iBitmap = -1;
|
||||||
|
|
||||||
if (iconData->uFlags & NIF_STATE)
|
if (iconData->uFlags & NIF_STATE)
|
||||||
{
|
{
|
||||||
|
@ -832,7 +833,7 @@ BOOL CNotifyToolbar::UpdateButton(_In_ CONST NOTIFYICONDATA *iconData)
|
||||||
InternalIconData * notifyItem;
|
InternalIconData * notifyItem;
|
||||||
TBBUTTONINFO tbbi = { 0 };
|
TBBUTTONINFO tbbi = { 0 };
|
||||||
|
|
||||||
TRACE("Updating icon %d from hWnd %08x flags%s%s state%s%s",
|
TRACE("Updating icon %d from hWnd %08x flags%s%s state%s%s\n",
|
||||||
iconData->uID, iconData->hWnd,
|
iconData->uID, iconData->hWnd,
|
||||||
(iconData->uFlags & NIF_ICON) ? " ICON" : "",
|
(iconData->uFlags & NIF_ICON) ? " ICON" : "",
|
||||||
(iconData->uFlags & NIF_STATE) ? " STATE" : "",
|
(iconData->uFlags & NIF_STATE) ? " STATE" : "",
|
||||||
|
@ -842,7 +843,7 @@ BOOL CNotifyToolbar::UpdateButton(_In_ CONST NOTIFYICONDATA *iconData)
|
||||||
int index = FindItem(iconData->hWnd, iconData->uID, ¬ifyItem);
|
int index = FindItem(iconData->hWnd, iconData->uID, ¬ifyItem);
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
WARN("Icon %d from hWnd %08x DOES NOT EXIST!", iconData->uID, iconData->hWnd);
|
WARN("Icon %d from hWnd %08x DOES NOT EXIST!\n", iconData->uID, iconData->hWnd);
|
||||||
return AddButton(iconData);
|
return AddButton(iconData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -941,7 +942,7 @@ BOOL CNotifyToolbar::RemoveButton(_In_ CONST NOTIFYICONDATA *iconData)
|
||||||
int index = FindItem(iconData->hWnd, iconData->uID, ¬ifyItem);
|
int index = FindItem(iconData->hWnd, iconData->uID, ¬ifyItem);
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
TRACE("Icon %d from hWnd %08x ALREADY MISSING!", iconData->uID, iconData->hWnd);
|
TRACE("Icon %d from hWnd %08x ALREADY MISSING!\n", iconData->uID, iconData->hWnd);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue