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: getNormalBounds()
for transparent windows on Windows
#38218
Conversation
I will have to point out that the fix is not going to work also if the window is minimized. |
@tomasmi interesting 🤔 i checked briefly with the window minimized and the result for console.log(mainWindow.getNormalBounds())
// { x: 560, y: 280, width: 800, height: 600 }
mainWindow.maximize()
console.log(mainWindow.getNormalBounds())
// { x: 560, y: 280, width: 800, height: 600 }
mainWindow.minimize()
console.log(mainWindow.getNormalBounds())
// { x: 560, y: 280, width: 800, height: 600 } |
@codebytere, I think that's actually the inadvertent result of another bug with transparent windows, which is if you maximize a window, then minimize it, This PR doesn't cover the case of a fullscreen window, which suffers from the same bug as maximized. Off the top of my head, I think some refactoring around |
Once this is rebased on #38234 it should work as expected |
eb0f47d
to
9e8300d
Compare
getNormalBounds()
for transparent windows on WingetNormalBounds()
for transparent windows on Windows
Release Notes Persisted
|
I have automatically backported this PR to "23-x-y", please check out #38347 |
I have automatically backported this PR to "25-x-y", please check out #38348 |
I have automatically backported this PR to "24-x-y", please check out #38349 |
Description of Change
Closes #38180.
Fixes an issue where
getNormalBounds()
returns incorrect bounds when a BrowserWindow is transparent and maximized. The underlying logic in widget doesn't account well for the transparent case - this is something we already account for in other areas.Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where
getNormalBounds()
returns incorrect bounds for transparent maximized windows on Windows.