Fix cocoa window usage to new transparent flag

This commit is contained in:
Bailey Cosier 2017-09-17 01:08:07 +07:00
parent 1d44ad152e
commit 817b697b7c
2 changed files with 3 additions and 3 deletions

View File

@ -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]];

View File

@ -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];