Repository navigation
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
41.1.1
What operating system(s) are you using?
Windows
Operating System Version
Windows 11 25H2
What arch are you using?
x64
Last Known Working Electron version
No response
Does the issue also appear in Chromium / Google Chrome?
No
Expected Behavior
An 800x600 window with frame: true should measure 800x600 including the titlebar.
Actual Behavior
The window measures 784x592, even though getBounds() and other APIs report 800x600. You can measure with the screenshot tool (assuming 100% scaling) or simply by creating a window with a frame and dragging it on top of one without.
Testcase Gist URL
Additional Information
The shrinking happens because getBounds() and setBounds() operate directly on the invisible widget (HWND). The visible part of the window gets shrunk down by Chromium to fit resize insets (8px on each side and bottom, so width-16px, height-8px). As a result, windows end up smaller and with less usable space than they are supposed to have.
This isn't an issue in Chromium where developers do not have direct control over window dimensions, but it is in Electron. Even if you account for the space that's intentionally taken up by the titlebar/menubar when useContentSize: false, the content area ends up too small: it should be ~800x543, not 784x535.
(This is not a case of the "window frame" taking up the space, which would be understandable. These insets are only present to support resize hit targets.)
This problem was recently addressed on Linux (#49209) and can be solved the same way on Windows. #50706 addresses it for frameless windows with external resize targets.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fields👍 Does Not Block Stable
Activity
Handle window sizing regressions on Windows in Electron 41+
Handle window sizing regressions on Windows in Electron 41+
Handle window sizing regressions on Windows in Electron 41+
Handle window sizing regressions on Windows in Electron 41+
Handle window sizing regressions on Windows in Electron 41+
Handle window sizing regressions on Windows in Electron 41+
electron-issue-triage commentedon Jul 7, 2026
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
mitchchn commentedon Jul 7, 2026
Bump :)
thorsent commentedon Jul 15, 2026
We're hitting this one too. Note the 16 pixels of empty space on this full width frameless window.
Note for a workaround, setting
thickFrame: falsebrings the scaling back to normal. Resizing with edge drag apparently continue to work even with thickFrame disabled.thorsent commentedon Jul 15, 2026
Possibly related issue: #51679
electron-issue-triage commentedon Oct 14, 2026
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
electron-issue-triage commentedon Nov 14, 2026
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.