https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8c91a00fcfc3a1aa46c9bf...
commit 8c91a00fcfc3a1aa46c9bfcee953d009691179f0 Author: gedmurphy gedmurphy@reactos.org AuthorDate: Thu Jan 18 16:30:13 2018 +0000 Commit: Ged Murphy gedmurphy@reactos.org CommitDate: Sat Jan 20 18:38:42 2018 +0000
Minor update --- base/shell/explorer/trayntfy.cpp | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-)
diff --git a/base/shell/explorer/trayntfy.cpp b/base/shell/explorer/trayntfy.cpp index 5b8ad09fa3..33ac6c85b3 100644 --- a/base/shell/explorer/trayntfy.cpp +++ b/base/shell/explorer/trayntfy.cpp @@ -41,11 +41,6 @@ struct IconWatcherData DWORD ProcessId; NOTIFYICONDATA IconData;
- IconWatcherData() - { - IconWatcherData(NULL); - } - IconWatcherData(NOTIFYICONDATA *iconData) : hProcess(NULL), ProcessId(0) { @@ -81,6 +76,7 @@ public: m_Loop(false) { } + virtual ~CIconWatcher() { Uninitialize(); @@ -235,12 +231,16 @@ private: if (Status == WAIT_OBJECT_0) { // We've been kicked, we have updates to our list (or we're exiting the thread) + if (This->m_Loop) + TRACE("Updating watched icon list"); } else if ((Status >= WAIT_OBJECT_0 + 1) && (Status < Size)) { IconWatcherData *Icon; 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); + int len = FIELD_OFFSET(SYS_PAGER_COPY_DATA, nicon_data) + Icon->IconData.cbSize; PSYS_PAGER_COPY_DATA pnotify_data = (PSYS_PAGER_COPY_DATA)new BYTE[len]; pnotify_data->cookie = 1; @@ -342,28 +342,6 @@ public: return -1; }
- int FindItem(IN GUID& Guid, NOTIFYICONDATA ** pdata) - { - int count = GetButtonCount(); - - for (int i = 0; i < count; i++) - { - NOTIFYICONDATA * data; - - data = GetItemData(i); - - if (data->guidItem == Guid) - { - if (pdata) - *pdata = data; - return i; - } - } - - return -1; - } - - BOOL AddButton(IN CONST NOTIFYICONDATA *iconData) { TBBUTTON tbBtn;