Transparent clickthrough window

NWJS Version : SDK 0.31.3
Operating System : Windows 10 1803 17134.112

Expected behavior

A transparent window, click-through. Even when pixel doesn’t have alpha 0.

Actual behavior

Creates a transparent click-through window, not click-through when mouse over pixel that doesn’t have alpha 0.

How to reproduce

package.json

{
  "name": "crosshair",
  "version": "1.0.0",
  "description": "crosshair.",
  "main": "crosshair.html",
  "license": "MIT",
  "window": {
    "transparent": true,
    "frame": false,
    "kiosk": false,
    "show": true,
    "show_in_taskbar": false,
    "fullscreen": false,
    "always_on_top": true,
    "resizable": false,
    "position": "center",
    "width": 1920, "height": 1080
  },
  "scripts": {"start": "./nw.exe . --disable-gpu --force-cpu-draw"}
}

crosshair.html

<html><head><meta charset="utf-8"/><style>body,html{display:flex;width:100%%;height:100%%;margin:0;padding:0;justify-content:center;align-items:center}.container{display:block;width:calc((1px * 4) + (((5px / 1.5) + 1px) * 2) + (10px * 2));height:calc((1px * 2) + (5px * 2) + (10px * 2) + 2px)}.line{display:block;border:1px solid #000;background:#C7EA46}.line.y{width:2px;height:10px}.line.x{width:10px;height:2px;float:left}.col-col,.row{width:100%%}.row{display:flex;height:calc((1px * 2) + 10px);justify-content:center}.row-spacer{display:block;width:100%%;height:calc(5px / 2)}.col-col,.col-spacer{display:block;height:calc((1px * 2) + 2px)}.col-spacer{float:left;width:calc((5px / 1.5) + 1px)}</style></head><body style="background:rgba(0,0,0,0)"><div class="container"><div class="row"><div class="line y"></div></div><div class="row-spacer"></div><div class="col-col"><div class="line x"></div><div class="col-spacer"></div><div class="col-spacer"></div><div class="line x"></div></div><div class="row-spacer"></div><div class="row"><div class="line y"></div></div></div></body></html>

Author: Fantashit

1 thought on “Transparent clickthrough window

Comments are closed.