From 3d8aa53573d488e45fa4a9f8ac40a6893386db63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 15 Mar 2017 01:19:54 +0100 Subject: [PATCH] Cocoa: Fix full screen window not being restorable Once a full screen window was iconified, it would appear to restore but then disappear. Fixes #848. --- README.md | 1 + src/cocoa_window.m | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f78926a..60e8dce5 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,7 @@ information on what to include when reporting a bug. - [Cocoa] Bugfix: Windows created after the first were not cascaded (#195) - [Cocoa] Bugfix: Leaving video mode with `glfwSetWindowMonitor` would set incorrect position and size (#748) +- [Cocoa] Bugfix: Iconified full screen windows could not be restored (#848) - [X11] Moved to XI2 `XI_RawMotion` for disable cursor mode motion input (#125) - [EGL] Added support for `EGL_KHR_get_all_proc_addresses` (#871) - [EGL] Bugfix: The test for `EGL_RGB_BUFFER` was invalid diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 54333952..92635035 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1025,7 +1025,12 @@ static GLFWbool createNativeWindow(_GLFWwindow* window, _glfw.ns.cascadePoint = [window->ns.object cascadeTopLeftFromPoint:_glfw.ns.cascadePoint]; if (wndconfig->resizable) - [window->ns.object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; + { + const NSWindowCollectionBehavior behavior = + NSWindowCollectionBehaviorFullScreenPrimary | + NSWindowCollectionBehaviorManaged; + [window->ns.object setCollectionBehavior:behavior]; + } if (wndconfig->floating) [window->ns.object setLevel:NSFloatingWindowLevel];