瀏覽代碼

cocoa: Force an OpenGL context update when the window becomes key.

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

Fixes Bugzilla #4272.
Ryan C. Gordon 7 年之前
父節點
當前提交
7689162ca0
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/video/cocoa/SDL_cocoawindow.m

+ 2 - 0
src/video/cocoa/SDL_cocoawindow.m

@@ -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