mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
Move handle_close_event() call to windowShouldClose, which only triggers when the close button is pressed by the user.
This commit is contained in:
parent
d51db6e39e
commit
2c513ba1c4
@ -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