From 9c15e2ff869903fad393aafe4e0e8798c942aa30 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 10 Oct 2013 00:09:03 +0200 Subject: [PATCH] Enabled Lion full screen. --- README.md | 1 + src/cocoa_window.m | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 1378172f..acb90574 100644 --- a/README.md +++ b/README.md @@ -214,6 +214,7 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/). - [Win32] Bugfix: The disabled cursor mode clip rectangle was updated for unfocused windows - [Cocoa] Added dependency on CoreVideo framework for refresh rate retrieval + - [Cocoa] Enabled Lion full screen for resizable windowed mode windows - [Cocoa] Bugfix: The `GLFW_KEY_GRAVE_ACCENT` key was reported as `GLFW_KEY_WORLD_1` and vice versa - [Cocoa] Bugfix: The `GLFW_KEY_F13` key was reported as diff --git a/src/cocoa_window.m b/src/cocoa_window.m index e04d5dc4..97338a97 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -858,7 +858,12 @@ static GLboolean createWindow(_GLFWwindow* window, #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_7) + { [window->ns.view setWantsBestResolutionOpenGLSurface:YES]; + + if (wndconfig->resizable) + [window->ns.object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; + } #endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ [window->ns.object setTitle:[NSString stringWithUTF8String:wndconfig->title]];