Preflight Checklist
Electron Version
42.2.0
What operating system(s) are you using?
Windows, Other Linux
Operating System Version
Windows 11 25H2, CachyOS (Wayland)
What arch are you using?
x64
Last Known Working Electron version
41.0.0
Does the issue also appear in Chromium / Google Chrome?
No
Expected Behavior
Centering a window with frame: false should center it (Windows/X11) or do nothing (Wayland).
Actual Behavior
The window shrinks.
Testcase Gist URL
https://gist.github.com/mitchchn/5455055d090ede993ebfbe0094dfd2ba
Additional Information
This is because the NativeWindowViews::Center() API does not account for insets which now exist on frameless windows on both Linux and Windows.
Preflight Checklist
Electron Version
42.2.0
What operating system(s) are you using?
Windows, Other Linux
Operating System Version
Windows 11 25H2, CachyOS (Wayland)
What arch are you using?
x64
Last Known Working Electron version
41.0.0
Does the issue also appear in Chromium / Google Chrome?
No
Expected Behavior
Centering a window with
frame: falseshould center it (Windows/X11) or do nothing (Wayland).Actual Behavior
The window shrinks.
Testcase Gist URL
https://gist.github.com/mitchchn/5455055d090ede993ebfbe0094dfd2ba
Additional Information
This is because the
NativeWindowViews::Center()API does not account for insets which now exist on frameless windows on both Linux and Windows.