From 2568dec27f296ba029b47580a4485ea155381d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 25 Nov 2014 18:23:26 +0000 Subject: [PATCH] Close NSWindows properly Don't just release the window, call the close method. This is usually the same, but in some situations, the difference (close sends NSWindowWillCloseNotification, which wx doesn't use) is significant. In particular, if the window is shown as fullscreen, OS X won't dispose of its space correctly when the window is released, but not closed first. See https://github.com/vslavik/poedit/issues/119 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/nonownedwnd.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index 9e79c6a458..5f160ea218 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -562,7 +562,8 @@ wxNonOwnedWindowCocoaImpl::~wxNonOwnedWindowCocoaImpl() if ([m_macWindow parentWindow] != 0) [[m_macWindow parentWindow] removeChildWindow: m_macWindow]; - [m_macWindow release]; + [m_macWindow setReleasedWhenClosed:YES]; + [m_macWindow close]; } }