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.
This commit is contained in:
Camilla Löwy
2017-03-15 01:19:54 +01:00
parent 7c88c92778
commit 3d8aa53573
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -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];