Inconsistent and inaccurate browser window size


I’m having problems with Electron 1.4.13 failing to accurately detect or set the size of a browser window. I’m setting the width and height when I intialize it, but even though I’ve verified that it indeed thinks it is the size I specified by logging the results of getBounds() and getSize(), in actuality if I take a screenshot and measure the size of the window (including its title bar and frame) I find that size to be quite different. In Linux, more specifically Xubuntu 16.04, it’s larger, gaining a tiny bit of extra width and quite a bit of height due to the frame and title bar, while in Windows 10, somehow I don’t understand, it’s actually smaller than the size it reports.

Does anyone know what’s going on here and how to work around it? If not, I’ll throw together a demonstration app and put it on Github for testing.


Before filing any issues please check if the issue exists in the latest release.


I haven’t filed an issue yet, intending to do what you suggest and to get feedback here first to make sure I haven’t done something wrong.
As promised, here’s the demonstration/bug reproduction app:
This was built with the latest version of Electron, 1.7.5, and has the same issue I described above, which I’ve verified again in both Windows 10 and Linux/Xubuntu 16.04.


An issue has now been created: