Skip to content

Window size off by one #50017

@DanielSWolf

Description

@DanielSWolf

Preflight Checklist

Electron Version

40.6.1

What operating system(s) are you using?

Ubuntu

Operating System Version

Ubuntu 24.04.4 LTS

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

Consider the attached gist, which attempts to display a full-screen window.
The expected behavior is that the window covers the screen exactly, and the two printed lines -- expected vs. actual window size -- match.

Actual Behavior

The window width and the window height are both 1 pixel too small. If you look closely, the rightmost pixel column and the bottom-most pixel rows aren't covered by the window.

Also, the output (on my machine) is:

Expected window size: 3440,1440
Actual window size: 3439,1439
Image

Testcase Gist URL

https://gist.github.com/DanielSWolf/2f7fbdd1dac6be56dab17799a01fecb0

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions