Commit a9f47ca0 authored by Leonard Grey's avatar Leonard Grey Committed by Commit Bot

Mac: exit browser fullscreen on Esc

Every (non-Chrome) Mac app I've tried supports this, and nobody seems to
know of a good reason for why we don't do it, so let's do it.

Bug: 1074609
Change-Id: I43e9b5137faf347e17e737e2e3f2cbdba4e6c470
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2174345Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764644}
parent 71e9d5d1
......@@ -274,10 +274,14 @@ bool FullscreenController::HandleUserPressedEscape() {
return true;
}
// On macOS, it's idiomatic to exit application fullscreen on Esc.
#if !defined(OS_MACOSX)
if (!IsWindowFullscreenForTabOrPending())
return false;
ExitExclusiveAccessIfNecessary();
ExitFullscreenModeForTab(exclusive_access_tab());
#else
ExitExclusiveAccessToPreviousState();
#endif
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment