Skip to content
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: maximized window bounds when toggle setResizable #40503

Merged
merged 1 commit into from Nov 22, 2023

Conversation

TomaszMa
Copy link
Contributor

Description of Change

Currently when we toggle setResizable function on maximized window then this window will change bounds and will not be equal to screen bounds.
This is happening because when we toggle setResizable then also HWNDMessageHandler::SizeConstraintsChanged() is called, where WS_THICKFRAME window style is removed.
Solution for this issue is to add WS_THICKFRAME for maximized window even if window is not resizable.

Checklist

Release Notes

Notes: Fix problem with bounds of maximized window when toggle BrowserWindow.setResizable function.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Nov 10, 2023
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Nov 17, 2023
@zcbenz zcbenz added platform/windows semver/patch backwards-compatible bug fixes target/26-x-y PR should also be added to the "26-x-y" branch. target/27-x-y PR should also be added to the "27-x-y" branch. target/28-x-y PR should also be added to the "28-x-y" branch. labels Nov 20, 2023
Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and verified to work as described - note though that the reported bounds don't change, it's a visual change that occurs when thickFrame is removed.

@zcbenz zcbenz merged commit 3340bc1 into electron:main Nov 22, 2023
22 of 23 checks passed
Copy link

release-clerk bot commented Nov 22, 2023

Release Notes Persisted

Fix problem with bounds of maximized window when toggle BrowserWindow.setResizable function.

@trop
Copy link
Contributor

trop bot commented Nov 22, 2023

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

@trop trop bot removed the target/26-x-y PR should also be added to the "26-x-y" branch. label Nov 22, 2023
@trop
Copy link
Contributor

trop bot commented Nov 22, 2023

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

@trop
Copy link
Contributor

trop bot commented Nov 22, 2023

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

@trop trop bot added in-flight/27-x-y in-flight/28-x-y merged/28-x-y PR was merged to the "28-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. merged/26-x-y PR was merged to the "26-x-y" branch. and removed target/27-x-y PR should also be added to the "27-x-y" branch. target/28-x-y PR should also be added to the "28-x-y" branch. in-flight/28-x-y in-flight/27-x-y in-flight/26-x-y labels Nov 22, 2023
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. merged/28-x-y PR was merged to the "28-x-y" branch. platform/windows semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants