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)

--HG--
branch : SDL-ryan-batching-renderer
This commit is contained in:
Ryan C. Gordon
2018-09-26 20:10:32 -04:00
parent 7f0ebb3cd4
commit a6eda22a6a

View File

@@ -632,6 +632,8 @@ SetWindowStyle(SDL_Window * window, NSUInteger style)
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