diff --git a/win32/FireflyShell/NotifyIcon.cpp b/win32/FireflyShell/NotifyIcon.cpp index d71432db..f9b8aff3 100644 --- a/win32/FireflyShell/NotifyIcon.cpp +++ b/win32/FireflyShell/NotifyIcon.cpp @@ -71,6 +71,14 @@ void CNotifyIcon::Destroy() base::DestroyWindow(); } +void CNotifyIcon::OnClose() +{ + // The only time this should happen is if something else explicitly + // sends us the message (such as the installer). We'll just + // exit completely. + GetApplication()->Exit(); +} + void CNotifyIcon::PopupBalloon(UINT title_id, UINT text_id, DWORD flags) { CString title, text; diff --git a/win32/FireflyShell/NotifyIcon.h b/win32/FireflyShell/NotifyIcon.h index 81179dbb..6f0b0c6c 100644 --- a/win32/FireflyShell/NotifyIcon.h +++ b/win32/FireflyShell/NotifyIcon.h @@ -45,6 +45,7 @@ class CNotifyIcon MESSAGE_HANDLER(WM_SERVEREVENT, OnServerEvent) MESSAGE_HANDLER(WM_WTSSESSION_CHANGE, OnSessionChange) MSG_WM_TIMER(OnTimer) + MSG_WM_CLOSE(OnClose) END_MSG_MAP() // Message handlers @@ -56,6 +57,7 @@ class CNotifyIcon LRESULT OnServerEvent(UINT, WPARAM, LPARAM, BOOL &bHandled); LRESULT OnSessionChange(UINT, WPARAM, LPARAM, BOOL &bHandled); void OnTimer(UINT id, TIMERPROC proc); + void OnClose(); void PopupBalloon(UINT title_id, UINT text_id, DWORD flags = NIIF_INFO);