From 20b4f894b71d4fc61169c20d6f274cc2a8f67440 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 5 Nov 2004 21:23:40 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=4493 --- clientgui/BOINCTaskBar.cpp | 2 ++ clientgui/MainFrame.cpp | 3 --- clientgui/msw/taskbarex.cpp | 7 +++++++ clientgui/msw/taskbarex.h | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/clientgui/BOINCTaskBar.cpp b/clientgui/BOINCTaskBar.cpp index 7308e96aff..55a8b63ed7 100644 --- a/clientgui/BOINCTaskBar.cpp +++ b/clientgui/BOINCTaskBar.cpp @@ -171,6 +171,8 @@ void CTaskBarIcon::OnClose( wxCloseEvent& event ) if ( NULL != pFrame ) pFrame->Close(true); + + event.Skip(); } diff --git a/clientgui/MainFrame.cpp b/clientgui/MainFrame.cpp index c80b476f83..b6f733964a 100644 --- a/clientgui/MainFrame.cpp +++ b/clientgui/MainFrame.cpp @@ -786,10 +786,7 @@ void CMainFrame::OnClose( wxCloseEvent& event ) if ( !event.CanVeto() ) Destroy(); else - { Hide(); - event.Veto(); - } } diff --git a/clientgui/msw/taskbarex.cpp b/clientgui/msw/taskbarex.cpp index 88df880e2c..38af9c1350 100644 --- a/clientgui/msw/taskbarex.cpp +++ b/clientgui/msw/taskbarex.cpp @@ -38,6 +38,7 @@ DEFINE_EVENT_TYPE( wxEVT_TASKBAR_BALLOON_USERCLICK ) IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIconEx, wxEvtHandler) BEGIN_EVENT_TABLE (wxTaskBarIconEx, wxEvtHandler) + EVT_CLOSE(wxTaskBarIconEx::OnClose) EVT_TASKBAR_CREATED(wxTaskBarIconEx::OnTaskBarCreated) END_EVENT_TABLE () @@ -70,6 +71,12 @@ wxTaskBarIconEx::~wxTaskBarIconEx(void) } // Events +void wxTaskBarIconEx::OnClose(wxCloseEvent& event) +{ + ::DestroyWindow((HWND) m_hWnd); + m_hWnd = 0; +} + void wxTaskBarIconEx::OnTaskBarCreated(wxTaskBarIconExEvent& event) { if (m_iconAdded) diff --git a/clientgui/msw/taskbarex.h b/clientgui/msw/taskbarex.h index c9f015e0fb..beeaa14491 100644 --- a/clientgui/msw/taskbarex.h +++ b/clientgui/msw/taskbarex.h @@ -42,6 +42,7 @@ public: }; // Events + virtual void OnClose( wxCloseEvent& event ); virtual void OnTaskBarCreated( wxTaskBarIconExEvent& event ); // Accessors