File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -591,7 +591,26 @@ - (void)setDefaultColorsBackground:(NSColor *)back foreground:(NSColor *)fore
591591 }
592592 }
593593 }
594+ else
594595#endif
596+ {
597+ // 10.13 or below. As noted above, the window flag
598+ // NSWindowStyleMaskTexturedBackground doesn't play well with window color,
599+ // but if we are toggling the titlebar transparent option, we need to set
600+ // the window background color in order the title bar to be tinted correctly.
601+ if ([[NSUserDefaults standardUserDefaults ]
602+ boolForKey: MMTitlebarAppearsTransparentKey]) {
603+ if ([back alphaComponent ] != 0 ) {
604+ [decoratedWindow setBackgroundColor: back];
605+ } else {
606+ // See above HACK for more details. Basically we cannot set a
607+ // color with 0 alpha or the window manager will give it a
608+ // different treatment.
609+ NSColor *clearColor = [back colorWithAlphaComponent: 0.001 ];
610+ [decoratedWindow setBackgroundColor: clearColor];
611+ }
612+ }
613+ }
595614
596615 [vimView setDefaultColorsBackground: back foreground: fore];
597616}
You can’t perform that action at this time.
0 commit comments