From 4c69535d724d87c50314771b032cbf7c40dad9e8 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 5 Jun 2013 16:31:05 +0200 Subject: [PATCH] Removed reconfiguration callback. The Core Graphics callback is called before the corresponding NSScreen object for a newly connected monitor is created, thus making monitor enumeration fail. --- src/cocoa_init.m | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/cocoa_init.m b/src/cocoa_init.m index d0247613..6c9eeb0a 100644 --- a/src/cocoa_init.m +++ b/src/cocoa_init.m @@ -71,13 +71,6 @@ static void changeToResourcesDirectory(void) #endif /* _GLFW_USE_CHDIR */ -static void reconfigurationCallback(CGDirectDisplayID displayID, - CGDisplayChangeSummaryFlags flags, - void* data) -{ - _glfwInputMonitorChange(); -} - ////////////////////////////////////////////////////////////////////////// ////// GLFW platform API ////// @@ -102,12 +95,6 @@ int _glfwPlatformInit(void) if (!_glfw.ns.eventSource) return GL_FALSE; - if (CGDisplayRegisterReconfigurationCallback(reconfigurationCallback, - NULL) != kCGErrorSuccess) - { - return GL_FALSE; - } - CGEventSourceSetLocalEventsSuppressionInterval(_glfw.ns.eventSource, 0.0); return GL_TRUE; @@ -115,8 +102,6 @@ int _glfwPlatformInit(void) void _glfwPlatformTerminate(void) { - CGDisplayRemoveReconfigurationCallback(reconfigurationCallback, NULL); - if (_glfw.ns.eventSource) { CFRelease(_glfw.ns.eventSource);