From b3bd912defece218339872f39c9b45cd3973f10f Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sun, 22 Feb 2004 16:40:40 +0000 Subject: [PATCH] Don't hide the last TLW immediately as this will prevent any idle events from coming anywhere and the last TLW we stay there as a ghost. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/toplvcmn.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index 71bc0468d3..aa0d96d70c 100644 --- a/src/common/toplvcmn.cpp +++ b/src/common/toplvcmn.cpp @@ -65,7 +65,7 @@ wxTopLevelWindowBase::~wxTopLevelWindowBase() bool shouldExit = IsLastBeforeExit(); wxTopLevelWindows.DeleteObject(this); - + if ( shouldExit ) { // then do it @@ -80,8 +80,16 @@ bool wxTopLevelWindowBase::Destroy() if ( !wxPendingDelete.Member(this) ) wxPendingDelete.Append(this); - // but hide it immediately - Hide(); + if (wxTopLevelWindows.GetCount() > 1) + { + // Hide it immediately. This should + // not be done if this TLW is the + // only one left since we then would + // risk not to get any idle events + // at all anymore during which we + // could delete any pending events. + Hide(); + } return TRUE; } -- 2.45.2