Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove 10.9 specific window conditions #15578

Merged
merged 1 commit into from Nov 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 3 additions & 10 deletions atom/browser/native_window_mac.mm
Expand Up @@ -1360,9 +1360,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {

void NativeWindowMac::AddContentViewLayers() {
// Make sure the bottom corner is rounded for non-modal windows:
// http://crbug.com/396264. But do not enable it on OS X 10.9 for transparent
// window, otherwise a semi-transparent frame would show.
if (!(transparent() && base::mac::IsOS10_9()) && !is_modal()) {
codebytere marked this conversation as resolved.
Show resolved Hide resolved
// http://crbug.com/396264.
if (!is_modal()) {
// For normal window, we need to explicitly set layer for contentView to
// make setBackgroundColor work correctly.
// There is no need to do so for frameless window, and doing so would make
Expand Down Expand Up @@ -1399,14 +1398,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
[[CustomWindowButtonView alloc] initWithFrame:NSZeroRect]);
[[window_ contentView] addSubview:buttons_view_];
} else {
if (title_bar_style_ != NORMAL) {
if (base::mac::IsOS10_9()) {
ShowWindowButton(NSWindowZoomButton);
ShowWindowButton(NSWindowMiniaturizeButton);
ShowWindowButton(NSWindowCloseButton);
}
if (title_bar_style_ != NORMAL)
return;
}

// Hide the window buttons.
[[window_ standardWindowButton:NSWindowZoomButton] setHidden:YES];
Expand Down