-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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: properly order out child windows on window.hide()
#29821
Conversation
window.hide()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm if I'm reading this right this is an annoying behavior change, where you can't open a child window and have it remain visible while hiding the parent. (E.g. Think about a certain app that has a calls window it opens as a child and then hides the parent).
Not sure what the correct solution is here but this will definitely affect existing apps
@MarshallOfSound I thought so too, but this behavior is the same for end users at present - if you add for example const child = new BrowserWindow({
width: 200,
height: 200,
parent: mainWindow
})
child.show()
setTimeout(() => {
mainWindow.hide()
}, 5000) to the default fiddle and run with e.g. child.show()
mainWindow.hide() you end up with a ghost main window (look at the transparent window): which this PR also ameliorates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm 👍 with this since it is fixing a DCHECK in Chromium.
Crash report failure is not relevant. |
No Release Notes |
I have automatically backported this PR to "12-x-y", please check out #29887 |
I have automatically backported this PR to "13-x-y", please check out #29888 |
I have automatically backported this PR to "14-x-y", please check out #29889 |
Description of Change
Closes #29820.
Properly orders out child windows when
window.hide()
is called on a parent window. This should not change any end user behavior, but Chromium specifically DCHECKs for it so we should handle it properly.Checklist
npm test
passesRelease Notes
Notes: none.