nwjs/nw.js

Transparent clickthrough window not working on MacOS Sonoma 14.0

tarunj370 opened this issue · 9 comments

Issue Type

  • [YES] Bug Report

  • [YES] Successfully reproduced against the latest version of NW.js?

Current/Missing Behavior

Clickthrough in the transparent window is working till macOS Ventura 13. Tested in the latest build v0.80.0. The behavior is broken after the macOS upgrade to Sonoma 14.0.

Expected/Proposed Behavior

Clickthrough should work in the macOS 14.0 too.

Additional Info

  • Operating System: macOS Sonoma 14.0
  • NW.js Version: v0.80.0
  • Repro Link: NA
  • Code snippet:
    "chromium-args": "--disable-gpu-compositing --force-cpu-draw --mixed-context"
  • Crash report: NA

@tarunj370 could you provide some sample code/a minimal repro demonstrating this?

Sure @ayushmanchhabra. I have attached a sample project here.

my-nwjs-app.zip

Min repro:

index.html

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no" />
</head>

<body>
    <h1>Hello World!</h1>
</body>

</html>

package.json

{
    "name": "8125",
    "main": "index.html",
    "scripts": {
        "start": "nw ."
    },
    "window": {
        "frame": false,
        "transparent": true
    },
    "chromium-args": "--disable-gpu-compositing --force-cpu-draw",
    "devDependencies": {
        "nw": "0.80.0-sdk"
    }
}

@rogerwang I was trying to test the transparent window behaviour on the latest Chromium build. I noticed that in the source, options.alphaEnabled is set.

I tried to create a new transparent window via Chromium DevTools but got a type error. Please advise on how to go about reproing transparent window behavior in Chrome/Chromium, thanks!

Command:

chrome.windows.create({ alphaEnabled: true }, () => {});

Error:

Uncaught TypeError: Cannot read properties of undefined (reading 'create')

If this behaviour is reproduced on latest Chromium build then a bug report can be filed in the Chromium bug tracker.

Any update on this @ayushmanchhabra @rogerwang ?

Is there any chance you could take a look @jtg-gg ?

jtg-gg commented

sorry @rogerwang I've moved on to different project
supporting this on my own time, will require lots of effort

@rogerwang I was trying to test the transparent window behaviour on the latest Chromium build. I noticed that in the source, options.alphaEnabled is set.

I tried to create a new transparent window via Chromium DevTools but got a type error. Please advise on how to go about reproing transparent window behavior in Chrome/Chromium, thanks!

Command:

chrome.windows.create({ alphaEnabled: true }, () => {});

Error:

Uncaught TypeError: Cannot read properties of undefined (reading 'create')

If this behaviour is reproduced on latest Chromium build then a bug report can be filed in the Chromium bug tracker.

@ayushmanchhabra

The chrome.windows.create method is specific to Chrome extensions and is not available for use in regular web pages or standalone JavaScript. It can only be used within the context of a Chrome extension.

Looks like this issue is resolved in the latest version of MacOS Sonoma 14.1.1. I think no update is required from the NWJS side.

@ayushmanchhabra @jtg-gg @rogerwang