Skip to content

Frameless non-resizable BrowserWindow reports incorrect bounds since v41.5.0. #51876

Closed

Description

@oalfroukh

Preflight Checklist

Electron Version

42.3.3

What operating system(s) are you using?

Windows

Operating System Version

Windows 11 Pro 23H2

What arch are you using?

x64

Last Known Working Electron version

41.4.0

Does the issue also appear in Chromium / Google Chrome?

I don't know how to test

Expected Behavior

getBounds() returns { width: 500, height: 75 } matching the constructor values.

Actual Behavior

getBounds() returns { width: 484, height: 67 } — 16px narrower, ~8px shorter.

Testcase Gist URL

https://gist.github.com/3ed4b0642f381e3ee11628a3672ae990

Additional Information

Key Observations

  • Only affects resizable: false windows — resizable: true works correctly
  • Only affects frame: false windows — framed windows unaffected
  • Reproducible at scale factor 1.0, so NOT a HiDPI/scaling issue
  • Offset matches typical Windows shadow/border insets (8px per side)
  • Introduced between 41.4.0 → 41.5.0

Electron Version: 41.5.0+ (regression from 41.4.0)
OS: Windows (confirmed with scale factor 1.0 and 2.0)
Platform: Windows 10/11


Summary

Frameless non-resizable BrowserWindow reports incorrect bounds since v41.5.0.
The actual window is smaller than the requested size by a fixed margin:

  • Width: −16px (8px each side)
  • Height: −8~9px (bottom only)

This suggests window frame/border insets are being incorrectly subtracted
from the client area even when frame: false is set.


Regression Range

Version Scale 1.0 Scale 2.0
41.4.0 ✅ Correct ⚠️ Off by 1px height only
41.5.0 ❌ −16w/−8h ❌ −16w/−7h

The Sample result:

41.4.0✅
Scale factor: 2
--- resizable: false ---
Expected: 500 x 75
Actual:   500 x 76
--- resizable: true ---
Expected: 500 x 75
Actual:   500 x 75

Scale factor: 1
--- resizable: false ---
Expected: 500 x 75
Actual:   500 x 75
--- resizable: true ---
Expected: 500 x 75
Actual:   500 x 75

41.5.0 ❌
Scale factor: 2
--- resizable: false ---
Expected: 500 x 75
Actual:   484 x 68
--- resizable: true ---
Expected: 500 x 75
Actual:   500 x 75

Scale factor: 1
--- resizable: false ---
Expected: 500 x 75
Actual:   484 x 67
--- resizable: true ---
Expected: 500 x 75
Actual:   500 x 75

Activity

  1. added theissue type on Jun 4, 2026
  2. added
    has-repro-gist
    on Jun 4, 2026
  3. moved this to 👀 Unsorted Items in 42-x-yon Jun 4, 2026
  4. nikwen commented on Jun 4, 2026

    @nikwen
    Member

    I believe this is a duplicate of #51679.

    @mitchchn Can you confirm?

  5. added
    blocked/need-info ❌
    on Jun 4, 2026
  6. oalfroukh commented on Jun 4, 2026

    @oalfroukh
    Author

    I believe this is a duplicate of #51679.

    @mitchchn Can you confirm?

    FYI, Last Known Working Electron version is 41.4.0 and not the same as #51679 (41.2.0) and I'm not using thickFrame: false

  7. removed
    blocked/need-info ❌
    on Jun 4, 2026
  8. mitchchn commented on Jun 5, 2026

    @mitchchn
    Member

    This is the same issue as in #51465, fixed in #51562.

  9. oalfroukh commented on Jun 10, 2026

    @oalfroukh
    Author

    Hi @mitchchn

    I see v42.4.0 was delivered without this fix. When do you think this fix will be backported to 42-x-y as #51562 is marked as no-backport?

  10. moved this from 👀 Unsorted Items to 🛠️ Fixed for Next Release in 42-x-yon Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    42-x-ybug 🪲component/BrowserWindowhas-repro-gistplatform/windows

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions