I am trying to make a transparent window with ElectronJs but I obtain a black background.
I am on Linux (Debian Jessie)
I have tried different versions : lat
I found a way to get it working! Try creating your window 10 milliseconds after Electron's ready, like this:
app.on('ready', function () {
setTimeout(function() {
createWindow();
}, 10);
});
Instead of: app.on('ready', createWindow);
I found it from this Github post: https://github.com/electron/electron/issues/2170#issuecomment-361549395
Also, you need to keep these command line flags for it to work: --enable-transparent-visuals --disable-gpu
Unfortunately Electron doesn't support transparent windows on linux.
I have actually tried a bunch of things to get it working but nothing has worked yet.
Source: https://github.com/electron/electron/issues/8532#issuecomment-306383343