The --hidden command is not working anymore
Description
The --hidden command is not working anymore.
Steps to reproduce
Start riot with:
"/usr/bin/riot-desktop" --hidden
expected riot to started in tray but it also showed the screen.
Version information
-
Platform: desktop
-
OS: Arch Linux (antergos)
-
Version: 0.12.6
Cannot reproduce, none of that code has changed for a good few versions, probably some weirdness with Electron :(
I have the same thing on Windows fwiw, on one machine its happily started in tray, on another machine it is not
The --hidden flag doesn't work for me, either. I'm on Ubuntu 20.04 (GNOME 3.36.1) and installed the Snap package. My startup command looks as follows (I've just appended the --hidden flag to the command present in the default .desktop file):
env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/riot-web_riot-web.desktop /snap/bin/riot-web --hidden %U
The Riot window is still opened after startup – although in a "broken" state as reported in vector-im/element-web#6961.
Screenshot:

Is this still the case with later versions of Electron?
Unsure if related, but in the last bunch of months, when I start my computer up (Ubuntu Linux) and Element starts with it, it is in the system tray minimised (--hidden flag seems to work), however when I click on Element in my side-bar application with the intent to maximise the minimised application, it starts a second instance of Element. And this only happens until I close the instance of Element that started at boot.
This MAY be related to the --hidden launch parameter, as when I launch Element from my side-bar it does not invoke the --hidden launch parameter at all.
FYI, testing this today it seems to work fine.