summaryrefslogtreecommitdiff
path: root/ui/trayIcon.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:05:53 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:05:53 +0200
commit618dfb51d93898632830f1b87443d3f748780871 (patch)
treebac520a2e261154f8d35b0cb8aa345f5ab373811 /ui/trayIcon.cpp
parent3.4 (diff)
downloadFreeFileSync-618dfb51d93898632830f1b87443d3f748780871.tar.gz
FreeFileSync-618dfb51d93898632830f1b87443d3f748780871.tar.bz2
FreeFileSync-618dfb51d93898632830f1b87443d3f748780871.zip
3.5
Diffstat (limited to 'ui/trayIcon.cpp')
-rw-r--r--ui/trayIcon.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/trayIcon.cpp b/ui/trayIcon.cpp
index b7f74d1d..554309ca 100644
--- a/ui/trayIcon.cpp
+++ b/ui/trayIcon.cpp
@@ -123,7 +123,7 @@ private:
//event handling
contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MinimizeToTray::OnContextMenuSelection), NULL, parent_);
- return contextMenu; //ownership transferred to library
+ return contextMenu; //ownership transferred to caller
}
MinimizeToTray* parent_;
@@ -167,12 +167,12 @@ void MinimizeToTray::resumeFromTray() //remove trayIcon and restore windows: Mi
}
trayIcon->RemoveIcon(); //hide icon until final deletion takes place
trayIcon->Disconnect(wxEVT_TASKBAR_LEFT_DCLICK, wxCommandEventHandler(MinimizeToTray::OnDoubleClick), NULL, this);
+ trayIcon->parentHasDied(); //TaskBarImpl (potentially) has longer lifetime than MinimizeToTray: avoid callback!
//use wxWidgets delayed destruction: delete during next idle loop iteration (handle late window messages, e.g. when double-clicking)
if (!wxPendingDelete.Member(trayIcon))
wxPendingDelete.Append(trayIcon);
- trayIcon->parentHasDied(); //TaskBarImpl (potentially) has longer lifetime than MinimizeToTray: avoid callback!
trayIcon = NULL; //avoid reentrance
}
}
bgstack15