From 34b7b2e4e8cbb1d13f281df1d23e15940cf2fa69 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 26 Oct 2018 22:29:05 +0530 Subject: [PATCH] Move to using upstream glfw fix for mojave initial render issue --- glfw/cocoa_window.m | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 143a8e4e2..c83d8c8b5 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -568,16 +568,6 @@ static GLFWapplicationshouldhandlereopenfun handle_reopen_callback = NULL; [super dealloc]; } --(void)setLayer:(CALayer*)layer -{ - [super setLayer:layer]; - if (window->context.client != GLFW_NO_API) { - // this is needed for initial rendering on mojave, see - // https://github.com/kovidgoyal/kitty/issues/887 - [window->context.nsgl.object update]; - } -} - - (_GLFWwindow*)glfwWindow { return window; } @@ -602,6 +592,14 @@ static GLFWapplicationshouldhandlereopenfun handle_reopen_callback = NULL; return YES; } +- (void)updateLayer +{ + if (window->context.client != GLFW_NO_API) + [window->context.nsgl.object update]; + + _glfwInputWindowDamage(window); +} + - (id)makeBackingLayer { if (window->ns.layer)