diff --git a/include/wx/html/helpfrm.h b/include/wx/html/helpfrm.h
index 13816fa3c1..c9bae539a0 100644
--- a/include/wx/html/helpfrm.h
+++ b/include/wx/html/helpfrm.h
@@ -109,7 +109,7 @@ public:
// we don't want to prevent the app from closing just because a help window
// remains opened
- virtual bool ShouldPreventAppExit() const;
+ virtual bool ShouldPreventAppExit() const { return false; }
protected:
void Init(wxHtmlHelpData* data = NULL);
diff --git a/samples/html/helpview/helpview.cpp b/samples/html/helpview/helpview.cpp
index 238deea26a..3cb2b9bc4d 100644
--- a/samples/html/helpview/helpview.cpp
+++ b/samples/html/helpview/helpview.cpp
@@ -84,8 +84,6 @@ bool MyApp::OnInit()
help -> DisplayContents();
- SetTopWindow(help->GetFrame());
-
return true;
}
diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp
index ea22fa9b6e..9ce75d6435 100644
--- a/src/html/helpfrm.cpp
+++ b/src/html/helpfrm.cpp
@@ -55,7 +55,6 @@
#include "wx/fontenum.h"
#include "wx/artprov.h"
#include "wx/spinctrl.h"
-#include "wx/app.h"
IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpFrame, wxFrame)
@@ -246,11 +245,4 @@ void wxHtmlHelpFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
}
#endif
-// we don't want to prevent the app from closing just because a help window
-// remains opened
-bool wxHtmlHelpFrame::ShouldPreventAppExit() const
-{
- return (wx_const_cast(wxHtmlHelpFrame*, this) == wxTheApp->GetTopWindow());
-}
-
#endif // wxUSE_WXHTML_HELP
diff --git a/utils/helpview/src/helpview.cpp b/utils/helpview/src/helpview.cpp
index 68991f7467..72b3daa6a3 100644
--- a/utils/helpview/src/helpview.cpp
+++ b/utils/helpview/src/helpview.cpp
@@ -219,8 +219,6 @@ bool hvApp::OnInit()
m_helpController->DisplayContents();
- SetTopWindow(m_helpController->GetFrame());
-
return true;
}