nwjs / nw.js

Call all Node.js modules directly from DOM/WebWorker and enable a new way of writing applications with all Web technologies.
https://nwjs.io
MIT License
40.3k stars 3.88k forks source link

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

Open sysrage opened 2 years ago

sysrage commented 2 years ago

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 commented 2 years ago

This is still broken in NW.js 0.65.0.

sysrage commented 2 years ago

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

sysrage commented 2 years ago

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 commented 2 years ago

This is still broken in NW.js 0.66.0.

sysrage commented 2 years ago

This is still broken in NW.js 0.67.1.

DanielVALAT commented 1 year ago

Still broken in nw.js 0.79.1 ...