Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: event propagation after exiting fullscreen on Windows #33788

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions shell/browser/api/electron_api_web_contents.cc
Expand Up @@ -1342,6 +1342,11 @@ void WebContents::ExitFullscreenModeForTab(content::WebContents* source) {
if (!owner_window_)
return;

// This needs to be called before we exit fullscreen on the native window,
// or the controller will incorrectly think we weren't fullscreen and bail.
exclusive_access_manager_->fullscreen_controller()->ExitFullscreenModeForTab(
source);

SetHtmlApiFullscreen(false);

if (native_fullscreen_) {
Expand All @@ -1350,9 +1355,6 @@ void WebContents::ExitFullscreenModeForTab(content::WebContents* source) {
// `chrome/browser/ui/exclusive_access/fullscreen_controller.cc`.
source->GetRenderViewHost()->GetWidget()->SynchronizeVisualProperties();
}

exclusive_access_manager_->fullscreen_controller()->ExitFullscreenModeForTab(
source);
}

void WebContents::RendererUnresponsive(
Expand Down