From 21280ca7754b3c21a5f2d1edb4d74c8d37d61b5a Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 19 Jan 2015 02:37:15 +0100 Subject: [PATCH] Fixed glfwSetWindowSize not changing video mode. glfwSetWindowSize did not change the video mode for full screen windows on OS X. Fixes #423. --- README.md | 3 +++ src/cocoa_window.m | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 40ff6998..d15c882c 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,9 @@ GLFW bundles a number of dependencies in the `deps/` directory. ## Changelog + - [Cocoa] Bugfix: `glfwSetWindowSize` did not change the video mode for full + screen windows + ## Contact diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 9d182f42..63efde2c 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -990,7 +990,10 @@ void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height) void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) { - [window->ns.object setContentSize:NSMakeSize(width, height)]; + if (window->monitor) + enterFullscreenMode(window); + else + [window->ns.object setContentSize:NSMakeSize(width, height)]; } void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)