From 836e709503f600436f582318a06efb8a8b33f2ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 5 Jul 2021 20:26:38 +0200 Subject: [PATCH] Cocoa: Remove calls to -update on nil These calls have no effect unless the context was created with NSGL. --- src/cocoa_window.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index b618dccc..b41c030d 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -243,7 +243,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; - (void)windowDidResize:(NSNotification *)notification { - if (window->context.client != GLFW_NO_API) + if (window->context.source == GLFW_NATIVE_CONTEXT_API) [window->context.nsgl.object update]; if (_glfw.ns.disabledCursorWindow == window) @@ -278,7 +278,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; - (void)windowDidMove:(NSNotification *)notification { - if (window->context.client != GLFW_NO_API) + if (window->context.source == GLFW_NATIVE_CONTEXT_API) [window->context.nsgl.object update]; if (_glfw.ns.disabledCursorWindow == window) @@ -397,7 +397,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; - (void)updateLayer { - if (window->context.client != GLFW_NO_API) + if (window->context.source == GLFW_NATIVE_CONTEXT_API) [window->context.nsgl.object update]; _glfwInputWindowDamage(window);