Skip to content

Commit

Permalink
fix: event propagation after exiting fullscreen on Windows (#33788)
Browse files Browse the repository at this point in the history
* fix: event propagation after exiting fullscreen on Windows

* ci: empty commit to trigger circleci

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
  • Loading branch information
3 people committed Apr 15, 2022
1 parent 1f99f5b commit fd3a49e
Showing 1 changed file with 5 additions and 3 deletions.
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

0 comments on commit fd3a49e

Please sign in to comment.