Fix dialogs sample never exiting with a persistent taskbar icon
If the latest user notification shown was shown with "Use persistent taskbar icon" toggled on, the application process would never really exit after closing. So delete m_taskbarIcon in destructor. Closes #24316.
This commit is contained in:
parent
f27c199fa8
commit
1864a49dd2
1 changed files with 9 additions and 0 deletions
|
|
@ -2552,6 +2552,15 @@ public:
|
|||
Bind(wxEVT_BUTTON, &TestNotificationMessageWindow::OnCloseClicked, this, wxID_CLOSE);
|
||||
}
|
||||
|
||||
~TestNotificationMessageWindow()
|
||||
{
|
||||
#if defined(__WXMSW__) && wxUSE_TASKBARICON
|
||||
// If the persistent taskbar icon has been created and is
|
||||
// not deleted at the end, the application will never exit.
|
||||
delete m_taskbarIcon;
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue