From 541a460f7bbaf5e90215e7b35e10049f50eb16f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 25 Nov 2014 18:23:02 +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/trunk@78177 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 961ff524bd..d31852c05e 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -613,7 +613,8 @@ wxNonOwnedWindowCocoaImpl::~wxNonOwnedWindowCocoaImpl() if ([m_macWindow parentWindow] != 0) [[m_macWindow parentWindow] removeChildWindow: m_macWindow]; - [m_macWindow release]; + [m_macWindow setReleasedWhenClosed:YES]; + [m_macWindow close]; } }