git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16532
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual bool IsOneOfBars(const wxWindow *WXUNUSED(win)) const
{ return FALSE; }
- // check if we should exit the program after deleting another top level
+ // check if we should exit the program after deleting this top level
// window (this is used in common dtor and wxMSW code)
- static bool IsLastBeforeExit();
+ bool IsLastBeforeExit() const;
// send the iconize event, return TRUE if processed
bool SendIconizeEvent(bool iconized = TRUE);
return TRUE;
}
-/* static */
-bool wxTopLevelWindowBase::IsLastBeforeExit()
+bool wxTopLevelWindowBase::IsLastBeforeExit() const
{
// we exit the application if there are no more top level windows left
// normally but wxApp can prevent this from happening
- return (wxTopLevelWindows.GetCount() == 1) &&
+ return wxTopLevelWindows.GetCount() == 1 &&
+ wxTopLevelWindows.GetFirst()->GetData() == (wxWindow *)this &&
wxTheApp && wxTheApp->GetExitOnFrameDelete();
}