diff --git a/pd/nw/index.js b/pd/nw/index.js index 6e9da613c3d48c96ffb10ddc1ee07eee7a9542da..4bce91ec3f2ac3c06a1c4aaac613e9d666f3ea12 100644 --- a/pd/nw/index.js +++ b/pd/nw/index.js @@ -399,9 +399,17 @@ function nw_create_window(cid, type, width, height, xpos, ypos, attr_array) { var eval_string = "register_window_id(" + JSON.stringify(cid) + ", " + JSON.stringify(attr_array) + ");"; + //pdgui.post("x=" + xpos + " y=" + ypos); + var pos; + if (xpos == 0 && ypos == 0) { + pos = "center"; + } else { + pos = "null"; + } gui.Window.open(my_file, { title: my_title, - position: "center", + // ico@vt.edu: position in 0.46.2 overrides x and y below + position: pos, focus: true, width: width, // We add 23 as a kludge to account for the menubar at the top of diff --git a/pd/nw/package.json b/pd/nw/package.json index b87c61f3cb80119e4a0a6e60d65c40fb744720ad..9f4e110d646c7285de6ec8ec4670ccdfa733f5eb 100644 --- a/pd/nw/package.json +++ b/pd/nw/package.json @@ -4,6 +4,9 @@ "main": "index.html", "chromium-args": "--proxy-server=http://127.0.0.1 --password-store=basic", "window": { - "icon": "./purr.png" + "icon": "./purr.png", + "position": "center", + "width": 540, + "height": 440 } }