Skip to content

fix: don't call TaskDialogIndirect with disabled parent windows#50078

Merged
jkleinsc merged 1 commit intoelectron:mainfrom
nmggithub:fix-windows-dialog-race-condition
Mar 10, 2026
Merged

fix: don't call TaskDialogIndirect with disabled parent windows#50078
jkleinsc merged 1 commit intoelectron:mainfrom
nmggithub:fix-windows-dialog-race-condition

Conversation

@nmggithub
Copy link
Copy Markdown
Contributor

@nmggithub nmggithub commented Mar 4, 2026

Description of Change

Should resolve #50068. This is a naïve fix, and I don't have a Windows dev box to easily test this on.

The documentation for TaskDialogIndirect includes the following line:

The parent window should not be hidden or disabled when this function is called.

This ensures we don't violate that remark.

Checklist

Release Notes

Notes: Fixed bug where opening a message box immediately upon closing a child window may cause the parent window to freeze on Windows.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Mar 4, 2026
@codebytere
Copy link
Copy Markdown
Member

Built and confirmed to fix via https://gist.github.com/588df1a282a47968008f5329fbee5aea

@codebytere codebytere added semver/patch backwards-compatible bug fixes 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 Mar 9, 2026
@electron-cation electron-cation bot added new-pr 🌱 PR opened recently and removed new-pr 🌱 PR opened recently labels Mar 9, 2026
@codebytere
Copy link
Copy Markdown
Member

@nmggithub can you rebase this

@nmggithub nmggithub force-pushed the fix-windows-dialog-race-condition branch from f6ed5e9 to 4f4982b Compare March 10, 2026 09:00
@nmggithub
Copy link
Copy Markdown
Contributor Author

@nmggithub can you rebase this

Just did so!

@jkleinsc jkleinsc merged commit f1705ec into electron:main Mar 10, 2026
62 checks passed
@release-clerk
Copy link
Copy Markdown

release-clerk bot commented Mar 10, 2026

Release Notes Persisted

Fixed bug where opening a message box immediately upon closing a child window may cause the parent window to freeze on Windows.

@trop
Copy link
Copy Markdown
Contributor

trop bot commented Mar 10, 2026

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

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

trop bot commented Mar 10, 2026

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

@trop
Copy link
Copy Markdown
Contributor

trop bot commented Mar 10, 2026

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

@trop trop bot added in-flight/39-x-y in-flight/41-x-y and removed target/39-x-y PR should also be added to the "39-x-y" branch. target/41-x-y PR should also be added to the "41-x-y" branch. labels Mar 10, 2026
@trop trop bot added merged/39-x-y PR was merged to the "39-x-y" branch. merged/41-x-y PR was merged to the "41-x-y" branch. merged/40-x-y PR was merged to the "40-x-y" branch. and removed in-flight/39-x-y in-flight/41-x-y in-flight/40-x-y labels Mar 10, 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. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calling dialog.showMessageBox on a parent window immediately after the closure of a modal window freezes the parent window

4 participants