mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Electron.App.CommandLine.AppendSwitch does not seem to be working propertly #927
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Yuvix25 on GitHub (Feb 2, 2024).
I'm building an app which is using a window with transparent background. While I did get it to work (thanks to #748 ), some users are seeing a black background instead of the transparent one. After doing some research, I stumbled upon this, so I tried adding the following flags:
However, when loading the


chrome://gpupage to see that these arguments were applied, it appeared that wasn't the case:I then tried manually adding the flags (
electronize start /args --disable-gpu-compositing --disable-gpu --disable-software-rasterizer), which gave me this result:So either I'm adding the
Electron.App.CommandLine.AppendSwitchs wrong, or they do not work.You can find the full source code of how I'm adding them here (note that you will only find the
disable-gpu-compositingflag there, I added the rest locally without pushing yet)If there is indeed a bug, is there any way I can get around this to force these arguments to always be passed?
Edit:
When manually adding the
appendSwitchs to themain.jsfile in ElectronNET.Host, they do work. I also made sure that the append switch message sent from Electron.NET is received in Electron.js, so I guess the issue has something to do with the time of appending the switches. I also tried appending them right at the start of theConfiguremethod - with no success.This worked: