summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-08-09 18:46:48 +0200
committerGitHub <noreply@github.com>2016-08-09 18:46:48 +0200
commitce72bef3a18ecdc173e2510030eff99ae8a48bb1 (patch)
tree7b67cd061010e5266d208c45b6cfba382a654003 /platform
parentd4c44485d8eee01a3a5065feb7fe4bf0fe30593e (diff)
parentbf320fd4eaae1bdaae08063573c88ab51d6edc34 (diff)
Merge pull request #6089 from marcelofg55/master
Crashfix for OSX on Sierra beta
Diffstat (limited to 'platform')
-rw-r--r--platform/osx/os_osx.mm6
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index ffae536ef0..b084a08ecc 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1494,8 +1494,6 @@ Size2 OS_OSX::get_window_size() const {
};
-const int menuHeight = [[NSStatusBar systemStatusBar] thickness];
-
void OS_OSX::set_window_size(const Size2 p_size) {
Size2 size=p_size;
@@ -1504,8 +1502,10 @@ void OS_OSX::set_window_size(const Size2 p_size) {
CGFloat menuBarHeight = [[[NSApplication sharedApplication] mainMenu] menuBarHeight];
if (menuBarHeight != 0.f) {
size.y+= menuBarHeight;
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101104
} else {
- size.y+= menuHeight;
+ size.y+= [[NSStatusBar systemStatusBar] thickness];
+#endif
}
NSRect frame = [window_object frame];
[window_object setFrame:NSMakeRect(frame.origin.x, frame.origin.y, size.x, size.y) display:YES];