Skip to content

fix: ensure stable bounds on Windows when toggling setResizable for frameless windows - #51252

Merged
ckerr merged 1 commit into
electron:mainfrom
mitchchn:mitch/fix-resizable-bounds-frameless-windows
Apr 23, 2026
Merged

ckerr merged 1 commit into
electron:mainfrom
mitchchn:mitch/fix-resizable-bounds-frameless-windows

Conversation

@mitchchn

@mitchchn mitchchn commented Apr 22, 2026 •

Copy link
Copy Markdown
Member

Description of Change

Fixes #51244.

Refs #50706.

Thick frame frameless windows now get input insets even if they aren't resizable, preventing their size from changing after calls to setResizability().

This additionally is more consistent with how native apps behave: e.g. run charmap.exe and drag it over a text document. The text cursor changes to the pointer before you reach the edge of the frame, and the window will be focused if you click in that area, even though it can't be resized by dragging.

Checklist

Release Notes

Notes: Fixed a regression on Windows where frameless windows changed their size after calling setResizable.

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Apr 22, 2026
@mitchchn
mitchchn force-pushed the mitch/fix-resizable-bounds-frameless-windows branch from 9fd5f67 to b2eb236 Compare April 22, 2026 15:07
@mitchchn
mitchchn force-pushed the mitch/fix-resizable-bounds-frameless-windows branch from b2eb236 to d934b59 Compare April 22, 2026 16:41
@mitchchn

Copy link
Copy Markdown
Member Author

This one will need 41 and 42.

@nikwen nikwen added semver/patch backwards-compatible bug fixes target/41-x-y PR should also be added to the "41-x-y" branch. target/42-x-y PR should also be added to the "42-x-y" branch. labels Apr 22, 2026
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Apr 23, 2026
@ckerr
ckerr merged commit 38cfc66 into electron:main Apr 23, 2026
77 checks passed
@release-clerk

release-clerk Bot commented Apr 23, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed a regression on Windows where frameless windows changed their size after calling setResizable.

@trop

trop Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "41-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot added needs-manual-bp/41-x-y and removed target/41-x-y PR should also be added to the "41-x-y" branch. labels Apr 23, 2026
@trop

trop Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

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

@trop trop Bot added in-flight/42-x-y merged/42-x-y PR was merged to the "42-x-y" branch. and removed target/42-x-y PR should also be added to the "42-x-y" branch. in-flight/42-x-y labels Apr 23, 2026
@gdavidkov

Copy link
Copy Markdown
Contributor

@mitchchn, could you please backport this PR to the 41-x-y branch?

@trop

trop Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

@mitchchn has manually backported this PR to "main", please check out #51427

@trop trop Bot added the in-flight/main label May 1, 2026
@trop

trop Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

@mitchchn has manually backported this PR to "41-x-y", please check out #51427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/41-x-y PR was merged to the "41-x-y" branch. merged/42-x-y PR was merged to the "42-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frameless BrowserWindow.getBounds() inflates by resize-hit insets after setResizable(true → false) on Windows (regression in 41.2.1 from #50863)

5 participants