diff --git a/src/cocoa_platform.h b/src/cocoa_platform.h index f8bfe3e65..3e952fa5e 100644 --- a/src/cocoa_platform.h +++ b/src/cocoa_platform.h @@ -81,7 +81,7 @@ typedef VkResult (APIENTRY *PFN_vkCreateMacOSSurfaceMVK)(VkInstance,const VkMacO #define _glfw_dlclose(handle) dlclose(handle) #define _glfw_dlsym(handle, name) dlsym(handle, name) -#define _GLFW_EGL_NATIVE_WINDOW ((EGLNativeWindowType) window->ns.view) +#define _GLFW_EGL_NATIVE_WINDOW ((EGLNativeWindowType) window->ns.layer) #define _GLFW_EGL_NATIVE_DISPLAY EGL_DEFAULT_DISPLAY #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNS ns diff --git a/src/cocoa_window.m b/src/cocoa_window.m index dd8879b51..cfbd766b7 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -849,6 +849,8 @@ static GLFWbool createNativeWindow(_GLFWwindow* window, [window->ns.object setBackgroundColor:[NSColor clearColor]]; } + [window->ns.view setWantsLayer:YES]; + window->ns.layer = [window->ns.view layer]; [window->ns.object setContentView:window->ns.view]; [window->ns.object makeFirstResponder:window->ns.view]; [window->ns.object setTitle:@(wndconfig->title)];