nw.js
nw.js copied to clipboard
Windows not centered when using `position: center` in Linux
NWJS Version : 0.61.0 through 0.64.1 Operating System : Linux (Ubuntu 20.04)
Expected behavior
When setting position: center
in a window's manifest, that window should appear centered on the primary display.
Actual behavior
The position: center
manifest property is ignored, starting with NW.js version 0.61.0. Windows appear in the top-left corner, instead.
This works properly with NW.js 0.60.0 and earlier builds. It fails with 0.61.0 and all later builds.
How to reproduce
package.json
{
"name": "test",
"main": "index.html",
"window": {
"position": "center"
}
}
index.html
<html><body>Hello world</body></html>
This is still broken in NW.js 0.65.0.
@rogerwang I'd appreciate if you could take a look. This prevents me from updating NW.js in my app. Thanks!
This is still broken in NW.js 0.65.1. I can also confirm it happens in both Ubuntu 20.04 and 22.04.
This is still broken in NW.js 0.66.0.
This is still broken in NW.js 0.67.1.
Still broken in nw.js 0.79.1 ...