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

libsdl.org revision control commits-owner at libsdl.org
Sat Sep 29 13:49:50 PDT 2018


details:   https://hg.libsdl.org/SDL/rev/4e77fde5bbc7
changeset: 12261:4e77fde5bbc7
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.
(transplanted from 55489adbb75c8eb7c7719a3f9c85a15d06df2f27)

diffstat:

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

diffs (12 lines):

diff -r 25ae936ee1e3 -r 4e77fde5bbc7 src/video/cocoa/SDL_cocoawindow.m
--- a/src/video/cocoa/SDL_cocoawindow.m	Tue Sep 25 21:35:09 2018 -0400
+++ 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