mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
mac: Update CSS on fullscreen window exit (fixes #3597)
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user