cocoa: Force an OpenGL context update when the window becomes key.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 26 Sep 2018 20:10:32 -0400
changeset 1223955489adbb75c
parent 12234 21c060522258
child 12240 08b190d518fc
cocoa: Force an OpenGL context update when the window becomes key.

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

Fixes Bugzilla #4272.
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Thu Sep 27 01:10:50 2018 +0300
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Wed Sep 26 20:10:32 2018 -0400
     1.3 @@ -632,6 +632,8 @@
     1.4      const unsigned int newflags = [NSEvent modifierFlags] & NSEventModifierFlagCapsLock;
     1.5      _data->videodata->modifierFlags = (_data->videodata->modifierFlags & ~NSEventModifierFlagCapsLock) | newflags;
     1.6      SDL_ToggleModState(KMOD_CAPS, newflags != 0);
     1.7 +
     1.8 +    ScheduleContextUpdates(_data);
     1.9  }
    1.10  
    1.11  - (void)windowDidResignKey:(NSNotification *)aNotification