You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Electron window requests fullscreen (the attached example gist attempts to toggle fullscreen every few seconds).
The window fails to enter fullscreen mode (due to being halfway between two virtual desktops), but remains usable.
Actual Behavior
Upon failing to enter fullscreen mode, the contents of the window freeze. In the attached example gist, this is visible in two distinct ways:
The red border around the window disappears on the right and bottom sides, which I believe is due to the contents of the window being rendered as if it is fullscreened (i.e. trying to fill the entire screen, but being clipped).
I have bisected this down to a regression that first appeared between v37.7.0 and v37.7.1, specifically in #47151 (and its backports).
As best as I can tell, following the failed fullscreen transition, the OS briefly reports the window as first occluded (which causes OnWindowHide to run), then visible (which previously caused OnWindowShow to run, but following #47151 now does nothing). It seems that the mismatched calls cause Chromium to think the page is hidden and thus does not need to be rendered.
This change fixes the issue for me locally (though it also means WebContents::WasShown runs twice back-to-back when Show is called, which I suspect is undesirable):
Preflight Checklist
Electron Version
39.2.7
What operating system(s) are you using?
macOS
Operating System Version
macOS Tahoe 26.1
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
37.7.0
Does the issue also appear in Chromium / Google Chrome?
No
Expected Behavior
Actual Behavior
Upon failing to enter fullscreen mode, the contents of the window freeze. In the attached example gist, this is visible in two distinct ways:
Testcase Gist URL
https://gist.github.com/cptpcrd/bf28bf81d7cd4c4f4197367b54c708ba
Additional Information
I have bisected this down to a regression that first appeared between v37.7.0 and v37.7.1, specifically in #47151 (and its backports).
As best as I can tell, following the failed fullscreen transition, the OS briefly reports the window as first occluded (which causes
OnWindowHideto run), then visible (which previously causedOnWindowShowto run, but following #47151 now does nothing). It seems that the mismatched calls cause Chromium to think the page is hidden and thus does not need to be rendered.This change fixes the issue for me locally (though it also means
WebContents::WasShownruns twice back-to-back whenShowis called, which I suspect is undesirable):