mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
Merge branch 'macosstuckwindowfix' of github.com:treamology/panda3d into release/1.10.x
Closes #536 Fixes #534
This commit is contained in:
commit
4e92b708ff
@ -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;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,6 @@ class CocoaGraphicsWindow;
|
||||
- (void)windowDidBecomeKey:(NSNotification *)notification;
|
||||
- (void)windowDidResignKey:(NSNotification *)notification;
|
||||
- (BOOL)windowShouldClose:(id)sender;
|
||||
- (void)windowWillClose:(NSNotification *)notification;
|
||||
|
||||
// TODO: handle fullscreen on Lion.
|
||||
|
||||
|
@ -50,11 +50,11 @@
|
||||
}
|
||||
|
||||
- (BOOL) windowShouldClose:(id)sender {
|
||||
return _graphicsWindow->handle_close_request();
|
||||
}
|
||||
|
||||
- (void) windowWillClose:(NSNotification *)notification {
|
||||
_graphicsWindow->handle_close_event();
|
||||
bool should_close = _graphicsWindow->handle_close_request();
|
||||
if (should_close) {
|
||||
_graphicsWindow->handle_close_event();
|
||||
}
|
||||
return should_close;
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
x
Reference in New Issue
Block a user