do not call SetFullScreen in SetKiosk if it's already fullscreen mode

This commit is contained in:
Daijiro Wachi 2017-01-19 00:40:34 +01:00
parent 71512ad244
commit a23d8ed702

View file

@ -1128,7 +1128,7 @@ void NativeWindowMac::SetKiosk(bool kiosk) {
[NSApp setPresentationOptions:options]; [NSApp setPresentationOptions:options];
is_kiosk_ = true; is_kiosk_ = true;
was_fullscreen_ = IsFullscreen(); was_fullscreen_ = IsFullscreen();
SetFullScreen(true); if (!was_fullscreen_) SetFullScreen(true);
} else if (!kiosk && is_kiosk_) { } else if (!kiosk && is_kiosk_) {
is_kiosk_ = false; is_kiosk_ = false;
if (!was_fullscreen_) SetFullScreen(false); if (!was_fullscreen_) SetFullScreen(false);