in case no layer

This commit is contained in:
kanjitalk755 2020-01-15 18:52:53 +09:00
parent 15cb9068b7
commit a11a61e48c

View File

@ -74,6 +74,7 @@ void make_window_transparent(SDL_Window * window)
CGColorRef clearColor = [NSColor clearColor].CGColor;
NSWindow *cocoaWindow = wmInfo.info.cocoa.window;
NSView *sdlView = cocoaWindow.contentView;
sdlView.wantsLayer = YES;
sdlView.layer.backgroundColor = [NSColor clearColor].CGColor;
if (SDL_GetWindowData(window, "observing") == NULL) {
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];