aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcelofg552016-06-04 12:35:00 -0300
committerRémi Verschelde2016-06-05 00:03:30 +0200
commitbed17e98c85106c49ffa8fab7ed752a5ce1f5e22 (patch)
tree28588ecbdbdd6e7829938d98c6cb2be1660dcbcf
parentc6ef223498e112bbce73e6cdf3db7de29a93e416 (diff)
downloadgodot-bed17e98c85106c49ffa8fab7ed752a5ce1f5e22.tar.gz
godot-bed17e98c85106c49ffa8fab7ed752a5ce1f5e22.tar.zst
godot-bed17e98c85106c49ffa8fab7ed752a5ce1f5e22.zip
Right click->Quit on the godot icon will now close the application on OSX.
Fixed get_window_position that missed a return on OSX. (cherry picked from commit 76ab7d3886c5a5e7c777e3cd9869e7b428247c06)
-rw-r--r--platform/osx/os_osx.mm8
1 files changed, 3 insertions, 5 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index d8f10bf10..11db5d9b3 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -139,12 +139,10 @@ static int button_mask=0;
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
{
-/* _Godotwindow* window;
+ if (OS_OSX::singleton->get_main_loop())
+ OS_OSX::singleton->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_QUIT_REQUEST);
- for (window = _Godot.windowListHead; window; window = window->next)
- _GodotInputWindowCloseRequest(window);
-*/
- return NSTerminateCancel;
+ return NSTerminateCancel;
}
- (void)applicationDidHide:(NSNotification *)notification