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.

NW2: User Window Metrics Not Saved/Respected

See original GitHub issue

Environment

  • NW.js Versions: 0.43.6 and 0.44.0 - reproducible on tag/nightly SDK/non-SDK builds.
  • Nightlies Tested: 20200117-051334 and 20200117-162000, respectively.
  • Tested Operating Systems: Linux (x64) and Windows 10 (x64).
  • Related Issues: #7230

Expected Behavior

NW2-mode windows should remember their last position and size upon launch.

Actual Behavior

NW2-mode windows (with window.id) don’t remember their last position and size upon relaunching NW. Windows are spawned at (0, 0) on the primary display with the initial size as specified in the package manifest.

A non-null window.position in the manifest is honored, though, it obviously has no effect on the initial size.

Reproduction

Manifest Bundle

nw1-nw2-manifests.zip

Demo (click for full size)

issue-capture

NW1 Manifest

{
  "name": "nwjs-window-position-history-nw1",
  "version": "1.0.0",
  "main": "data:,NW1 - OK",
  "chromium-args": "--disable-features=nw2",
  "window":
  {
    "id": "main",
    "width": 640,
    "height": 480
  }
}

NW2 Manifest

{
  "name": "nwjs-window-position-history-nw2",
  "version": "1.0.0",
  "main": "data:,NW2 - Fail",
  "chromium-args": "",
  "window":
  {
    "id": "main",
    "width": 640,
    "height": 480
  }
}

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
rogerwangcommented, Jan 18, 2020

This is fixed in git and will be available in the next nightly build.

1reaction
rogerwangcommented, Jan 20, 2020

The nightly build for this issue is available at https://dl.nwjs.io/live-build/nw44/20200119-184735/a8c4ae39c

Read more comments on GitHub >

github_iconTop Results From Across the Web

NW.js v0.44.0 Released with Chromium 80
The autoprint API Window.print() adds a silent option to hide the print window ... Fix: NW2: User Window Metrics Not Saved/Respected (#7322) ...
Read more >
Troubleshooting Azure Monitor metric charts - Microsoft Learn
Use this article if you run into issues with creating, customizing, or interpreting charts in Azure metrics explorer.
Read more >
CHANGELOG.md · nw52 · mirrors / rogerwang / node-webkit
Update Node.js to v15.0.1; Add mixed_context window option for new_instance ... Fix: NW2: User Window Metrics Not Saved/Respected (#7322) ...
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