From 817b697b7ca82270a90e378ae55cda618046c4f6 Mon Sep 17 00:00:00 2001 From: Bailey Cosier Date: Sun, 17 Sep 2017 01:08:07 +0700 Subject: [PATCH] Fix cocoa window usage to new transparent flag --- src/cocoa_window.m | 4 ++-- src/nsgl_context.m | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 3359c31c4..9c48ee361 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -413,7 +413,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; - (BOOL)isOpaque { - // Set to NO even if alphaMask is not used; + // Set to NO even if transparent is not used; // The NSView/GLFWContentView does not need to be opaque anyway, // and to avoid keeping track of alphaMask inside the NSView we // just return NO here instead. @@ -1085,7 +1085,7 @@ static GLFWbool createNativeWindow(_GLFWwindow* window, if (wndconfig->ns.retina) [window->ns.view setWantsBestResolutionOpenGLSurface:YES]; - if (wndconfig->alphaMask) + if (wndconfig->transparent) { [window->ns.object setOpaque:NO]; [window->ns.object setBackgroundColor:[NSColor clearColor]]; diff --git a/src/nsgl_context.m b/src/nsgl_context.m index d75c1f32e..a7cbf00f3 100644 --- a/src/nsgl_context.m +++ b/src/nsgl_context.m @@ -296,7 +296,7 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window, return GLFW_FALSE; } - if (fbconfig->alphaMask) + if (fbconfig->transparent) { GLint opaque = 0; [window->context.nsgl.object setValues:&opaque forParameter:NSOpenGLCPSurfaceOpacity];