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: win.isMaximized()
for transparent windows on Windows
#38234
Conversation
811e94f
to
4221b24
Compare
@codebytere, looks like the new test fails on macOS, it must also have a bug with transparent windows and |
613fb21
to
ef9da36
Compare
Release Notes Persisted
|
I have automatically backported this PR to "24-x-y", please check out #38343 |
I have automatically backported this PR to "23-x-y", please check out #38344 |
I have automatically backported this PR to "25-x-y", please check out #38345 |
Description of Change
Fixes an issue where calling
win.minimize()
directly after callingwin.maximize()
, and then callingwin.isMaximized()
incorrectly returnstrue
.This is happening because widget methods don't work as expected in several cases for transparent windows, and so we fall back to an approximation approach where we compare bounds. However, bounds when minimized match the screen area when minimized, so the resulting comparison can false positive to true. We should ensure it's not minimized before proceeding.
Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where calling
win.minimize()
directly after callingwin.maximize()
, and then callingwin.isMaximized()
incorrectly returnstrue
.