Skip to content

Commit

Permalink
cocoa: Force an OpenGL context update when the window becomes key.
Browse files Browse the repository at this point in the history
Fixes missing rendering on macOS 10.14 ("Mojave").

Fixes Bugzilla #4272.
  • Loading branch information
icculus committed Sep 27, 2018
1 parent 6eeb859 commit 7689162
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -632,6 +632,8 @@ - (void)windowDidBecomeKey:(NSNotification *)aNotification
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
Expand Down

0 comments on commit 7689162

Please sign in to comment.