From 566e04f1c0fee47f35fcf3e9169c87c416ba5785 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 5 Jun 2017 13:13:16 -0700 Subject: [PATCH] :art: --- atom/browser/native_window_mac.mm | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 7763098e7781..6000b175cbcb 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -701,21 +701,17 @@ enum { // Custom window button methods - (void)performClose:(id)sender { - if (shell_->custom_window_buttons()) { + if (shell_->custom_window_buttons()) [[self delegate] windowShouldClose:self]; - return; - } - - [super performClose:sender]; + else + [super performClose:sender]; } - (void)performMiniaturize:(id)sender { - if (shell_->custom_window_buttons()) { + if (shell_->custom_window_buttons()) [self miniaturize:self]; - return; - } - - [super performMiniaturize:sender]; + else + [super performMiniaturize:sender]; } @end @@ -851,7 +847,6 @@ NativeWindowMac::NativeWindowMac( options.Get(options::kCustomWindowButtons, &custom_window_buttons_); NSUInteger styleMask = NSTitledWindowMask; - if (custom_window_buttons_ && base::mac::IsAtLeastOS10_10() && (!useStandardWindow || transparent() || !has_frame())) {