Merge pull request #23100 from pcbeard/osx_blankscreen_fix

macOS: Update context when window becomes the key window
This commit is contained in:
Rémi Verschelde 2018-10-24 15:37:39 +02:00 committed by GitHub
commit 1287e0300d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}