mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
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()`.