Skip to content

fix: ensure WebContents::WasShown runs when window is shown#49421

Merged
jkleinsc merged 1 commit intoelectron:mainfrom
cptpcrd:fullscreen-freeze
Mar 18, 2026
Merged

fix: ensure WebContents::WasShown runs when window is shown#49421
jkleinsc merged 1 commit intoelectron:mainfrom
cptpcrd:fullscreen-freeze

Conversation

@cptpcrd
Copy link
Contributor

@cptpcrd cptpcrd commented Jan 16, 2026

Description of Change

Fixes #49347 (a regression from #47151) by calling WebContents::WasShown whenever OnWindowShow runs, unless it was previously called by Show or ShowInactive.

Checklist

Release Notes

Notes: Fixed window freeze when failing to enter/exit fullscreen on macOS.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jan 16, 2026
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jan 23, 2026
@codebytere codebytere added the semver/patch backwards-compatible bug fixes label Jan 26, 2026
@codebytere codebytere added target/39-x-y PR should also be added to the "39-x-y" branch. target/40-x-y PR should also be added to the "40-x-y" branch. target/41-x-y PR should also be added to the "41-x-y" branch. labels Jan 26, 2026
@codebytere
Copy link
Member

codebytere commented Jan 26, 2026

@cptpcrd possible to add a new test for this case? You also need to sign your commit

@cptpcrd
Copy link
Contributor Author

cptpcrd commented Jan 26, 2026

@cptpcrd possible to add a new test for this case?

The actual bug only seems to reproduce when entering fullscreen fails. As noted in #43112, I'm not aware of any way to trigger that without user intervention. If there is a way, then it would certainly be possible to add a test.

You also need to sign your commit

Done.

@codebytere
Copy link
Member

@cptpcrd can you rebase this? sorry for delay

Avoids a freeze when failing to enter fullscreen on macOS.
@github-actions github-actions bot added the target/42-x-y PR should also be added to the "42-x-y" branch. label Mar 13, 2026
@jkleinsc jkleinsc merged commit 12ea28c into electron:main Mar 18, 2026
278 of 295 checks passed
@release-clerk
Copy link

release-clerk bot commented Mar 18, 2026

Release Notes Persisted

Fixed window freeze when failing to enter/exit fullscreen on macOS.

@trop
Copy link
Contributor

trop bot commented Mar 18, 2026

I have automatically backported this PR to "39-x-y", please check out #50341

@trop
Copy link
Contributor

trop bot commented Mar 18, 2026

I have automatically backported this PR to "42-x-y", please check out #50342

@trop trop bot removed the target/39-x-y PR should also be added to the "39-x-y" branch. label Mar 18, 2026
@trop
Copy link
Contributor

trop bot commented Mar 18, 2026

I have automatically backported this PR to "41-x-y", please check out #50343

@trop
Copy link
Contributor

trop bot commented Mar 18, 2026

I have automatically backported this PR to "40-x-y", please check out #50344

@trop trop bot added in-flight/40-x-y merged/41-x-y PR was merged to the "41-x-y" branch. merged/39-x-y PR was merged to the "39-x-y" branch. merged/42-x-y PR was merged to the "42-x-y" branch. merged/40-x-y PR was merged to the "40-x-y" branch. and removed target/42-x-y PR should also be added to the "42-x-y" branch. target/41-x-y PR should also be added to the "41-x-y" branch. target/40-x-y PR should also be added to the "40-x-y" branch. in-flight/41-x-y in-flight/39-x-y in-flight/42-x-y in-flight/40-x-y labels Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/39-x-y PR was merged to the "39-x-y" branch. merged/40-x-y PR was merged to the "40-x-y" branch. merged/41-x-y PR was merged to the "41-x-y" branch. merged/42-x-y PR was merged to the "42-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Window freezes on macOS when failing to enter fullscreen (regression)

3 participants