From a110937a16c2c2c2bd49fce8b4321e2b66bbfae6 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Sun, 4 Nov 2018 11:16:58 +0200 Subject: [PATCH] Fix initial blank screen on macOS Mojave (except splash). (cherry picked from commit 07aee14dd775397156056a9ff8526b586aaabef8) --- platform/osx/os_osx.mm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 6684ce51f25..16d92911977 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -367,6 +367,8 @@ static Vector2 get_mouse_pos(NSPoint locationInWindow, CGFloat backingScaleFacto bool imeMode; } - (void)cancelComposition; +- (BOOL)wantsUpdateLayer; +- (void)updateLayer; @end @implementation GodotContentView @@ -377,6 +379,14 @@ static Vector2 get_mouse_pos(NSPoint locationInWindow, CGFloat backingScaleFacto } } +- (BOOL)wantsUpdateLayer { + return YES; +} + +- (void)updateLayer { + [OS_OSX::singleton->context update]; +} + - (id)init { self = [super init]; trackingArea = nil;