NW2-mode windows should remember their last position and size upon launch.
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.

{
"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
}
}
{
"name": "nwjs-window-position-history-nw2",
"version": "1.0.0",
"main": "data:,NW2 - Fail",
"chromium-args": "",
"window":
{
"id": "main",
"width": 640,
"height": 480
}
}
Thanks for reporting. There was a fix for #7314 but it didn't cover this case.
Thanks for reporting. There was a fix for #7314 but it didn't cover this case.
My apologies for missing such a fresh issue. I just eyeballed #7230 and didn't immediately see anything similar prior to filing this ticket.
Many thanks for your continued support of this project.
This is fixed in git and will be available in the next nightly build.
Thanks for the quick patch.
FYI, I tested this against v0.44.0's 20200118-162000/efb396e87 build and yesterday's fix seems to have resolved the window position issue only when the last state of the window is not maximized.
If the window is closed while it's maximized, it's restored in an incorrect position and with an incorrect size. Moreover, the original window size (pre-maximized) does not seem to be respected upon window restore.
In NW1 mode, everything works as expected. If a window is closed while it's maximized, it's restored to the maximized state upon launch and the window's title bar restore control restores the window to the previous geometry as well. This is not the case in NW2 mode.


Pretty much the same as the ones in the original issue.
{
"name": "nwjs-window-position-history-nw2-7322-test",
"version": "1.0.0",
"main": "about:blank",
"window":
{
"id": "main",
"width": 640,
"height": 480
}
}
{
"name": "nwjs-window-position-history-nw1-7322-test",
"version": "1.0.0",
"main": "about:blank",
"chromium-args": "--disable-features=nw2",
"window":
{
"id": "main",
"width": 640,
"height": 480
}
}
This is fixed in git and will be available in the next nightly build.
The nightly build for this issue is available at https://dl.nwjs.io/live-build/nw44/20200119-184735/a8c4ae39c
No longer able to reproduce this issue on the latest linux/win x64 nightlies. Thanks again for the quick fix!
Most helpful comment
This is fixed in git and will be available in the next nightly build.