[Commits] SDL: cocoa: Force an OpenGL context update when the window becom...

libsdl.org revision control commits-owner at libsdl.org
Wed Sep 26 17:12:51 PDT 2018


details:   https://hg.libsdl.org/SDL/rev/55489adbb75c
changeset: 12239:55489adbb75c
user:      Ryan C. Gordon <icculus at icculus.org>
date:      Wed Sep 26 20:10:32 2018 -0400
description:
cocoa: Force an OpenGL context update when the window becomes key.

Fixes missing rendering on macOS 10.14 ("Mojave").

Fixes Bugzilla #4272.

diffstat:

 src/video/cocoa/SDL_cocoawindow.m |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r 21c060522258 -r 55489adbb75c src/video/cocoa/SDL_cocoawindow.m
--- a/src/video/cocoa/SDL_cocoawindow.m	Thu Sep 27 01:10:50 2018 +0300
+++ b/src/video/cocoa/SDL_cocoawindow.m	Wed Sep 26 20:10:32 2018 -0400
@@ -632,6 +632,8 @@
     const unsigned int newflags = [NSEvent modifierFlags] & NSEventModifierFlagCapsLock;
     _data->videodata->modifierFlags = (_data->videodata->modifierFlags & ~NSEventModifierFlagCapsLock) | newflags;
     SDL_ToggleModState(KMOD_CAPS, newflags != 0);
+
+    ScheduleContextUpdates(_data);
 }
 
 - (void)windowDidResignKey:(NSNotification *)aNotification


More information about the commits mailing list