Skip to content

Commit

Permalink
Make title bar transparent for compact and non-title-bar windows. Iss…
Browse files Browse the repository at this point in the history
…ue 7493
  • Loading branch information
gnachman committed Jan 29, 2019
1 parent d058156 commit c295531
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion sources/PseudoTerminal.m
Original file line number Diff line number Diff line change
Expand Up @@ -5811,7 +5811,30 @@ - (void)setMojaveBackgroundColor:(nullable NSColor *)backgroundColor NS_AVAILABL
break;
}
self.window.backgroundColor = self.anyPaneIsTransparent ? [NSColor clearColor] : [NSColor windowBackgroundColor];
self.window.titlebarAppearsTransparent = NO; // Keep it from showing content from other windows behind it. Issue 7108.
self.window.titlebarAppearsTransparent = [self titleBarShouldAppearTransparent]; // Keep it from showing content from other windows behind it. Issue 7108.
}

- (BOOL)titleBarShouldAppearTransparent {
switch (windowType_) {
case WINDOW_TYPE_TOP:
case WINDOW_TYPE_LEFT:
case WINDOW_TYPE_RIGHT:
case WINDOW_TYPE_BOTTOM:
case WINDOW_TYPE_NORMAL:
case WINDOW_TYPE_ACCESSORY:
case WINDOW_TYPE_TOP_PARTIAL:
case WINDOW_TYPE_LEFT_PARTIAL:
case WINDOW_TYPE_RIGHT_PARTIAL:
case WINDOW_TYPE_BOTTOM_PARTIAL:
case WINDOW_TYPE_LION_FULL_SCREEN:
case WINDOW_TYPE_TRADITIONAL_FULL_SCREEN:
break;

case WINDOW_TYPE_NO_TITLE_BAR:
case WINDOW_TYPE_COMPACT:
return YES;
}
return NO;
}

- (void)setLegacyBackgroundColor:(nullable NSColor *)backgroundColor {
Expand Down

0 comments on commit c295531

Please sign in to comment.