From 5a95aaaa54525c4c980ad7175306cad890e5be62 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 10 Apr 2018 16:54:07 +0900 Subject: [PATCH] kVibrancyType should be read in InitFromOptions --- atom/browser/native_window.cc | 6 ++++++ atom/browser/native_window_mac.mm | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 643d084672c6..0a3db8cbf071 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -131,6 +131,12 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) { if (options.Get(options::kKiosk, &kiosk) && kiosk) { SetKiosk(kiosk); } +#if defined(OS_MACOSX) + std::string type; + if (options.Get(options::kVibrancyType, &type)) { + SetVibrancy(type); + } +#endif std::string color; if (options.Get(options::kBackgroundColor, &color)) { SetBackgroundColor(ParseHexColor(color)); diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index e57d9c5b007c..79af0073c9c6 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -970,11 +970,6 @@ NativeWindowMac::NativeWindowMac(const mate::Dictionary& options, return event; }]; - std::string type; - if (options.Get(options::kVibrancyType, &type)) { - SetVibrancy(type); - } - // Set maximizable state last to ensure zoom button does not get reset // by calls to other APIs. SetMaximizable(maximizable);