From a23d8ed702d589c09c6d24d8c27e4c0f2aa161da Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Thu, 19 Jan 2017 00:40:34 +0100 Subject: [PATCH] do not call SetFullScreen in SetKiosk if it's already fullscreen mode --- atom/browser/native_window_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 15e3cb4439c7..037d0be487db 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -1128,7 +1128,7 @@ void NativeWindowMac::SetKiosk(bool kiosk) { [NSApp setPresentationOptions:options]; is_kiosk_ = true; was_fullscreen_ = IsFullscreen(); - SetFullScreen(true); + if (!was_fullscreen_) SetFullScreen(true); } else if (!kiosk && is_kiosk_) { is_kiosk_ = false; if (!was_fullscreen_) SetFullScreen(false);