Skip to content

fix: preserve transparency across setResizable toggles on Windows - #51217

Merged
codebytere merged 1 commit into
41-x-yfrom
trop/41-x-y-bp-fix-preserve-transparency-across-setresizable-toggles-on-windows-1776792757222
Apr 22, 2026
Merged

codebytere merged 1 commit into
41-x-yfrom
trop/41-x-y-bp-fix-preserve-transparency-across-setresizable-toggles-on-windows-1776792757222

Conversation

@trop

@trop trop Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Backport of #51175

See that PR for details.

Notes: Fixed frameless transparent windows on Windows losing their transparency after setResizable(false) followed by setResizable(true).

After #49428 made `NativeWindowViews::CanResize()` return `resizable_`
for frameless windows (instead of `resizable_ && thick_frame_`),
`HWNDMessageHandler::SizeConstraintsChanged()` started adding
`WS_THICKFRAME` to the window style whenever `CanResize()` reported true.
`WS_THICKFRAME` is incompatible with layered (translucent) windows and
destroys their transparency.

`SetContentSizeConstraints` already guards against this by skipping
`OnSizeConstraintsChanged()` when `!thick_frame_`. `SetResizable` did
not, so toggling resizability on a transparent window (e.g.
`setResizable(false)` then `setResizable(true)`) caused the Chromium
path to add `WS_THICKFRAME` and strip transparency.

Apply the same guard in `SetResizable`. Min/max constraints are still
enforced — Chromium reads them from the widget delegate on every
`WM_GETMINMAXINFO`, independent of `SizeConstraintsChanged()`.

Co-authored-by: Shelley Vohr <[email protected]>
@trop
trop Bot requested review from a team and codebytere April 21, 2026 17:32
@trop trop Bot added 41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Apr 21, 2026
@codebytere
codebytere merged commit 2c05608 into 41-x-y Apr 22, 2026
113 of 118 checks passed
@codebytere
codebytere deleted the trop/41-x-y-bp-fix-preserve-transparency-across-setresizable-toggles-on-windows-1776792757222 branch April 22, 2026 10:33
@release-clerk

release-clerk Bot commented Apr 22, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed frameless transparent windows on Windows losing their transparency after setResizable(false) followed by setResizable(true).

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

Labels

41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant