Hey guys,
thanks for your great work on NW.js 🙂
On Windows it seems the size of the window is not correct. If I set a 1280×720 in package.json the window’s content area is a few pixel to large. See this screenshot:
https://puu.sh/rqxay/a7ef6e8492.png
You can see the white borders on the screenshot. The black area is 1280×720. Its very easy to reproduce, just grab current NW.js Version (17.5) or even an older version and use the following package.json:
{
"name": "test",
"main": "index.html",
"window": {
"width": 1280,
"height": 720,
"title": "Game Test"
}
}
with this in index.html:
<div style="position: absolute; left: 0px; top: 0px; background-color: black; width: 1280px; height: 720px;"></div>
Not sure if I did something wrong here(?), but on OS X it works fine. It seems only on Windows this bug happens. Not sure about Linux. This is a problem for games if you want the window’s content area to match the resolution of the game. It would be cool if that can be fixed in future releases.
I remember there are pure JavaScript solutions to figure out the window’s border and title-bar sizes so maybe that could be a workaround. But it would be cool that just could be fixed.
Thanks!
Will try to fix it. Thanks.