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
This commit is contained in:
Václav Slavík
2014-11-25 18:23:26 +00:00
parent 9b9b96b88b
commit 2568dec27f

View File

@@ -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];
}
}