-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NW2: User Window Metrics Not Saved/Respected #7322
Comments
Thanks for reporting. There was a fix for #7314 but it didn't cover this case. |
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. Failing Behavior - NW2 (click for full size)Expected Behavior - NW1 (click for full size)ManifestsPretty much the same as the ones in the original issue. NW2 - Failing Behavior{
"name": "nwjs-window-position-history-nw2-7322-test",
"version": "1.0.0",
"main": "about:blank",
"window":
{
"id": "main",
"width": 640,
"height": 480
}
} NW1 - Expected Behavior{
"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! |
saved > API parameter > default in manifest > default value Fix nwjs/nw.js#7370 CC nwjs/nw.js#7322 CC nwjs/nw.js#7314
Environment
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)
NW1 Manifest
NW2 Manifest
The text was updated successfully, but these errors were encountered: