From eebddb377ee7b87ff33a876951c3888a83d3d064 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 12 Jun 2012 23:32:46 +0000 Subject: [PATCH] =?utf8?q?avoiding=20dangerous=20redraw=20events=20for=20w?= =?utf8?q?indows=20that=20are=20on=20their=20way=20out=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/toplevel_osx.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/osx/toplevel_osx.cpp b/src/osx/toplevel_osx.cpp index b660d8f474..f92665932e 100644 --- a/src/osx/toplevel_osx.cpp +++ b/src/osx/toplevel_osx.cpp @@ -106,7 +106,13 @@ bool wxTopLevelWindowMac::Destroy() if (m_nowpeer && m_nowpeer->GetWXWindow()) ClearKeyboardFocus( (WindowRef)m_nowpeer->GetWXWindow() ); #endif - return wxTopLevelWindowBase::Destroy(); + // delayed destruction: the tlw will be deleted during the next idle + // loop iteration + if ( !wxPendingDelete.Member(this) ) + wxPendingDelete.Append(this); + + Hide(); + return true; } -- 2.50.0