mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-17 17:02:51 +08:00
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:
committed by
Vadim Zeitlin
parent
f27c199fa8
commit
1864a49dd2
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user