question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 1280x720 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 1280x720. 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!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:28 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
rogerwangcommented, Feb 27, 2019

Will try to fix it. Thanks.

1reaction
rogerwangcommented, Dec 28, 2019

closing as this is fixed in nw2 mode.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Window Size Problem - Windows 10 - Microsoft Community
Window Size Problem - Windows 10. Apparently, I've stumbled upon a problem in windows 10. When I was about to change the sound...
Read more >
How to make League of Legends Full Screen [Window Size Bug]
2. Try the Window Size option · Click on the Settings icon. · From the left side, select the General tab. · Look...
Read more >
Window Size Bug : r/AmongUs - Reddit
Does anyone have anything on changing the tab size? Ive been able to change it from full screen to a tab but my...
Read more >
Bug: Window Position/Size not saved when restarting ... - GitHub
Describe the bug Window Position and Size not saved when restarting To Reproduce Steps to reproduce: Change Warp Window Size and/or Position ...
Read more >
When privacy.resistFingerprinting = true, set new windows to ...
Bug 1330882 - Part 4: Making the window.open() can only open rounded windows and the inner window will be automatically rounded after setting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found