mac: Update CSS on fullscreen window exit (fixes #3597)

This commit is contained in:
Marshall Greenblatt
2023-11-07 16:40:29 -05:00
parent 21e01d4889
commit 3837f209e1
11 changed files with 186 additions and 10 deletions

View File

@@ -651,6 +651,18 @@ void ViewsWindow::OnWindowFullscreenTransition(CefRefPtr<CefWindow> window,
if (should_change && with_controls_) {
ShowTopControls(!window->IsFullscreen());
}
// With Alloy runtime we need to explicitly exit browser fullscreen when
// exiting window fullscreen. Chrome runtime handles this internally.
if (!MainContext::Get()->UseChromeRuntime() && should_change &&
!window->IsFullscreen()) {
CefRefPtr<CefBrowser> browser = browser_view_->GetBrowser();
if (browser && browser->GetHost()->IsFullscreen()) {
// Will not cause a resize because the fullscreen transition has already
// begun.
browser->GetHost()->ExitFullscreen(/*will_cause_resize=*/false);
}
}
}
void ViewsWindow::OnWindowCreated(CefRefPtr<CefWindow> window) {