mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
* chore: remove window enlargement revert patch Chromium removed the `window_enlargement_` system from DesktopWindowTreeHostWin (1771dbae), which was a workaround for an AMD driver bug from 2013 (crbug.com/286609) where translucent HWNDs smaller than 64x64 caused graphical glitches. Chromium confirmed this is no longer needed and shipped the removal. This removes the revert patch and all Electron-side code that depended on the `kEnableTransparentHwndEnlargement` feature flag, including the `GetExpandedWindowSize` helper and max size constraint expansion in `NativeWindow::GetContentMaximumSize`. Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * test: remove obsolete <64x64 transparent window test The test was added in 2018 (#12904) to verify the AMD driver workaround that artificially enlarged translucent HWNDs smaller than 64x64 (crbug.com/286609). The workaround set the real HWND to 64x64 and subtracted a stored window_enlargement_ from every client/window bounds query, so getContentSize() reported the originally-requested size even though the actual HWND was larger. With both the Chromium window_enlargement_ system and Electron's GetExpandedWindowSize gone, setContentSize on a transparent thickFrame window calls SetWindowPos directly. WS_THICKFRAME windows are subject to DefWindowProc's MINMAXINFO.ptMinTrackSize clamp on programmatic resizes (Chromium's OnGetMinMaxInfo ends with SetMsgHandled(FALSE), so DefWindowProc overwrites the zeroed min-track with system defaults), which on Windows Server 2025 floors at 32x39 — hence the failing [32, 39] vs [30, 30]. The removed feature_list.cc comment explicitly flagged this test as the blocker for retiring kEnableTransparentHwndEnlargement, so delete it alongside the workaround it was validating. Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>