diff --git a/README.md b/README.md index b2d0d01a..0a551e82 100644 --- a/README.md +++ b/README.md @@ -264,6 +264,7 @@ information on what to include when reporting a bug. - [Cocoa] Bugfix: Window title was lost when full screen or undecorated (#1082) - [Cocoa] Bugfix: Window was resized twice when entering full screen (#1085) - [Cocoa] Bugfix: Duplicate size events were not filtered (#1085) +- [Cocoa] Bugfix: Event polling did not initialize AppKit if necessary (#1218) - [WGL] Added support for `WGL_EXT_colorspace` for OpenGL ES contexts - [WGL] Added support for `WGL_ARB_create_context_no_error` - [GLX] Added support for `GLX_ARB_create_context_no_error` diff --git a/src/cocoa_window.m b/src/cocoa_window.m index e1bbce1c..077c9e89 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1534,6 +1534,9 @@ void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity) void _glfwPlatformPollEvents(void) { + if (!initializeAppKit()) + return; + for (;;) { NSEvent* event = [NSApp nextEventMatchingMask:NSEventMaskAny