Description
- Electron version: 1.6.2, 1.6.6
- Operating system: Windows 10 (10.0.14393)
Expected behavior
When maximizing a frameless BrowserWindow
on Windows (only tested on Windows 10) the the window should position itself at 0,0 and extend to the full width and height of the current screen minus the Windows 10 task bar (40px).
Actual behavior
The window is positioned slightly off-screen by -8px in both x and y axis as well as extending a further 8 by 8 pixels more than expected on each axis. This is illustrated below by some screenshots from my console window (w here is a reference to the BrowserWindow
retrieved by calling remote.getCurrentWindow
)
On my monitor the size of a maximized window should be 2560x1400 (full width and -40px to account for the Windows task bar) but it seems to be 16px too large both on the x and y axis.
There's a 16px magic number in the electron code base that I suspect might have something to do with it but it could just be a coincidence as well.
How to reproduce
I've put up a small repro at https://github.com/niik/electron-maximized-frameless-test
$ git clone https://github.com/niik/electron-maximized-frameless-test -b master
$ npm install
$ npm start
The window has a dotted red outline around its outermost edge as well as a (hard to spot) yellow outline around it's fake title bar.
Clicking on the maximize button in the (client rendered) title bar should maximize the window and the outline should still be visible but it isn't
Additionally (while hard to spot) the window can be seen to extend below the Windows task bar (that faint gray line)