src/video/cocoa/SDL_cocoawindow.m
changeset 12405 5a95fbfd3617
parent 12404 eb60e952b13f
child 12424 6b3a68e3dd06
equal deleted inserted replaced
12404:eb60e952b13f 12405:5a95fbfd3617
  1183 -(void) updateLayer
  1183 -(void) updateLayer
  1184 {
  1184 {
  1185     /* Force the graphics context to clear to black so we don't get a flash of
  1185     /* Force the graphics context to clear to black so we don't get a flash of
  1186        white until the app is ready to draw. In practice on modern macOS, this
  1186        white until the app is ready to draw. In practice on modern macOS, this
  1187        only gets called for window creation and other extraordinary events. */
  1187        only gets called for window creation and other extraordinary events. */
  1188     self.layer.backgroundColor = NSColor.blackColor.CGColor;
  1188     self.layer.backgroundColor = CGColorGetConstantColor(kCGColorBlack);
  1189     ScheduleContextUpdates((SDL_WindowData *) _sdlWindow->driverdata);
  1189     ScheduleContextUpdates((SDL_WindowData *) _sdlWindow->driverdata);
  1190     SDL_SendWindowEvent(_sdlWindow, SDL_WINDOWEVENT_EXPOSED, 0, 0);
  1190     SDL_SendWindowEvent(_sdlWindow, SDL_WINDOWEVENT_EXPOSED, 0, 0);
  1191 }
  1191 }
  1192 
  1192 
  1193 - (void)rightMouseDown:(NSEvent *)theEvent
  1193 - (void)rightMouseDown:(NSEvent *)theEvent