nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

Windows not centered when using `position: center` in Linux

Open sysrage opened this issue 2 years ago • 6 comments

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>

sysrage avatar May 17 '22 00:05 sysrage

This is still broken in NW.js 0.65.0.

sysrage avatar Jun 01 '22 00:06 sysrage

@rogerwang I'd appreciate if you could take a look. This prevents me from updating NW.js in my app. Thanks!

sysrage avatar Jun 01 '22 00:06 sysrage

This is still broken in NW.js 0.65.1. I can also confirm it happens in both Ubuntu 20.04 and 22.04.

sysrage avatar Jun 11 '22 01:06 sysrage

This is still broken in NW.js 0.66.0.

sysrage avatar Jun 29 '22 00:06 sysrage

This is still broken in NW.js 0.67.1.

sysrage avatar Aug 12 '22 00:08 sysrage

Still broken in nw.js 0.79.1 ...

DanielVALAT avatar Sep 01 '23 08:09 DanielVALAT