From ec7701bb7d4c9691342ffff730892f83c987b7bc Mon Sep 17 00:00:00 2001 From: Sergey Tikhomirov Date: Sat, 15 Oct 2016 15:25:42 +0300 Subject: [PATCH] Cocoa: Fix 'first responder' error on macOS 10.12 Error message is displayed during the startup because Cocoa view is set as the first responder for window but this view isn't in this window (actually it is not in any window at all). --- src/cocoa_window.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 6b6415851..1cc2ffebe 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1032,11 +1032,11 @@ static GLFWbool createNativeWindow(_GLFWwindow* window, [window->ns.view setWantsBestResolutionOpenGLSurface:YES]; #endif /*_GLFW_USE_RETINA*/ + [window->ns.object setContentView:window->ns.view]; [window->ns.object makeFirstResponder:window->ns.view]; [window->ns.object setTitle:[NSString stringWithUTF8String:wndconfig->title]]; [window->ns.object setDelegate:window->ns.delegate]; [window->ns.object setAcceptsMouseMovedEvents:YES]; - [window->ns.object setContentView:window->ns.view]; [window->ns.object setRestorable:NO]; return GLFW_TRUE;