From a9e7bb0027d6fc29a864d41fcd76cadd61a01e72 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 16 Jan 2023 10:06:43 +0100 Subject: [PATCH] fix: Cmd+Tab not working when exiting kiosk mode (#36854) --- shell/browser/native_window_mac.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 186c3e8a64aa..1251434ae919 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -1030,9 +1030,12 @@ void NativeWindowMac::SetKiosk(bool kiosk) { is_kiosk_ = true; SetFullScreen(true); } else if (!kiosk && is_kiosk_) { - [NSApp setPresentationOptions:kiosk_options_]; is_kiosk_ = false; SetFullScreen(false); + + // Set presentation options *after* asynchronously exiting + // fullscreen to ensure they take effect. + [NSApp setPresentationOptions:kiosk_options_]; } }