]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/taskbar/tbtest.cpp
merged in the commit from the 2.2 branch
[wxWidgets.git] / samples / taskbar / tbtest.cpp
index 74a7200000d814d03282d43487a8187a550ebf1d..45896485f1e983c9174e3bfb07e57c9e9a258a1a 100644 (file)
@@ -103,14 +103,19 @@ BEGIN_EVENT_TABLE(MyTaskBarIcon, wxTaskBarIcon)
     EVT_MENU(PU_EXIT,    MyTaskBarIcon::OnMenuExit)
 END_EVENT_TABLE()
 
-void MyTaskBarIcon::OnMenuRestore(wxEvent& )
+void MyTaskBarIcon::OnMenuRestore(wxCommandEvent& )
 {
     dialog->Show(TRUE);
 }
 
-void MyTaskBarIcon::OnMenuExit(wxEvent& )
+void MyTaskBarIcon::OnMenuExit(wxCommandEvent& )
 {
     dialog->Close(TRUE);
+
+    // Nudge wxWindows into destroying the dialog, since
+    // with a hidden window no messages will get sent to put
+    // it into idle processing.
+    wxGetApp().ProcessIdle();
 }