summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-10-24 15:37:39 +0200
committerGitHub <noreply@github.com>2018-10-24 15:37:39 +0200
commit1287e0300d9b98addf719e5ccb2fd45b7bc97f58 (patch)
treec40fab2831ba4a9d61e7df448f7770c6be7c716b
parentcfa8ef1f77f7630a10fd80fb8c742ef7e78601cb (diff)
parentd2ed3b224a070c0cf3ea5e595e7273dace754fff (diff)
Merge pull request #23100 from pcbeard/osx_blankscreen_fix
macOS: Update context when window becomes the key window
-rw-r--r--platform/osx/os_osx.mm1
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 6ab433203f..6cb6b5bbd2 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -325,6 +325,7 @@ static Vector2 get_mouse_pos(NSEvent *event) {
- (void)windowDidBecomeKey:(NSNotification *)notification {
//_GodotInputWindowFocus(window, GL_TRUE);
//_GodotPlatformSetCursorMode(window, window->cursorMode);
+ [OS_OSX::singleton->context update];
if (OS_OSX::singleton->get_main_loop())
OS_OSX::singleton->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_FOCUS_IN);
}