mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
Fix cocoa window usage to new transparent flag
This commit is contained in:
parent
1d44ad152e
commit
817b697b7c
@ -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]];
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user