diff --git src/video/cocoa/SDL_cocoawindow.m src/video/cocoa/SDL_cocoawindow.m index a8e95cc..b9d9790 100644 --- src/video/cocoa/SDL_cocoawindow.m +++ src/video/cocoa/SDL_cocoawindow.m @@ -1172,12 +1172,15 @@ SetWindowStyle(SDL_Window * window, NSUInteger style) -(void) updateLayer { +/* this is only called on 10.8+, so restricting the build to the 10.8+ SDK is OK */ +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 /* Force the graphics context to clear to black so we don't get a flash of white until the app is ready to draw. In practice on modern macOS, this only gets called for window creation and other extraordinary events. */ self.layer.backgroundColor = NSColor.blackColor.CGColor; ScheduleContextUpdates((SDL_WindowData *) _sdlWindow->driverdata); SDL_SendWindowEvent(_sdlWindow, SDL_WINDOWEVENT_EXPOSED, 0, 0); +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 */ } - (void)rightMouseDown:(NSEvent *)theEvent