Fix an instance where a macOS window will stick around when trying to have it destroyed.

This commit also removes an extraneous call to [_window setReleasedWhenClosed], which is already set in cocoaPandaWindow's init method.
This commit is contained in:
Donny Lawrence 2019-01-13 11:46:57 -05:00
parent 095d6ac818
commit d51db6e39e

View File

@ -711,8 +711,11 @@ close_window() {
}
if (_window != nil) {
[_window setReleasedWhenClosed: YES];
[_window close];
// Process events once more so any pending NSEvents are cleared. Not doing
// this causes the window to stick around after calling [_window close].
process_events();
_window = nil;
}