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.39k stars 3.88k forks source link

bug: win.setResizable with transparent does not work 21.4 #5821

Open mscreenie opened 7 years ago

mscreenie commented 7 years ago

I tested without transparent and setResizable works fine. As soon as you turn transparency setResizable does not work and window cannot be resized.

package.json

{
  "name": "d3-clock",
  "version": "0.0.1",
  "main": "index.html",
  "scripts": {
    "start": "nw"
  },
  "window": {
    "width":300,
     "resizable": false,
    "frame": false,
    "transparent": true,
  "height":100,
    "always-on-top": true
  },
  "chromium_args" : "--disable-user-media-security --allow-file-access-from-files"

}
Christywl commented 7 years ago

I can't reproduce this issue on Linux with nwjs-sdk-v0.21.4. The window could be resized after it turns transparency.

index.html:
<script>
var win = nw.Window.get();
win.setResizable(true);
</script>
package.json:
{
  "name": "test",
  "main": "index.html",
  "window": {
    "width":300,
    "height":100,
    "resizable": false,
    "frame": false,
    "transparent": true,
    "always_on_top": true
  }
}

5821

mscreenie commented 7 years ago

The problem could be Windows 7 specific. Setting re-sizable false in package and then changing it using API causes error but it only seems when Aero is on.

I hope someone else can confirm, I've tried it in VM - Steps to reproduce.

http://www24.zippyshare.com/v/8j0GBuB1/file.html

1) Turn on Aero on Windows 7 2) I've attached the sample app.

edit: may be related to https://github.com/nwjs/nw.js/issues/5407

just checked your app should reproduce the issue. maybe its windows 7 specific with aero.

Christywl commented 7 years ago

I can reproduce on Windows 10/8 with nwjs-sdk-v0.21.4.

mscreenie commented 7 years ago

Thanks for confirming this bug. Any idea on a time frame for fix?