WebCord icon indicating copy to clipboard operation
WebCord copied to clipboard

--start-minimized and -m flags not working on Linux/Plasma

Open ver4a opened this issue 3 years ago • 2 comments

Aknowledgements

  • [x] I have checked that there's no other issue describing the same or similar problem that I currently have, regardless if it has been closed or open.

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

19.0.7

Application version

3.4.0

Bug description

On Fedora 36 with KDE/Plasma the flags for starting in tray don't have any effect. With regular discord and other apps, this feature works. I have installed WebCord with .rpm package.

Edit: removed not-related aknowledgements

ver4a avatar Jul 11 '22 15:07 ver4a

I can't find any cause of it on Linux, neither can reproduce it. The code is actually quite simple for this flag:

  • the window is hidden once it is initialized;
  • whenever flag is not set, the window should show.

So, if it is failing, it's probably an Electron issue, either because app.commandLine fails to detect the flag or window does not hide when initialized. I could fix this, but I don't know what's causing it, so until I'll reproduce it, I won't fix this.

SpacingBat3 avatar Jul 14 '22 08:07 SpacingBat3

A lot has changed as of the Electron version and the way how CLI flags are actually parsed. Is it still reproducible?

SpacingBat3 avatar Jul 25 '22 06:07 SpacingBat3

Sorry for a late reply, with webcord 3.7.1 and electron 20.0.1 I can't reproduce the issue on the same install nor in a VM.

ver4a avatar Aug 12 '22 19:08 ver4a

I would like to reopen this issue as I have found the reason I have not been able to reliably reproduce it.

The -m flag is only ignored if the last state WebCord was in was maximized before being closed. This time I have created 3 Fedora 36 VMs (virt manager): Workstation (GNOME), KDE Plasma spin and Xfce spin. I have been able to reproduce this issue on all of them, All of them were using xorg/x11 and are fully updated. WebCord was installed from github releases rpm package.

Workstation:

  • GNOME: 42.5
  • WM: Mutter KDE Plasma spin:
  • Plasma 5.25.5
  • WM: KWin Xfce spin:
  • Xfce 4.16
  • WM: Xfwm4

WebCord: 3.8.6 (all installations) Electron: 21.0.1 (all installations)

I hope this time I have given you some useful information.

ver4a avatar Oct 03 '22 05:10 ver4a

Sorry for the lack of the responsiveness. I'll reopen on this and work once I'll got a time, probably next week or later.

What you wrote makes sense to me, considering there's a mechanism in WebCord to preserve the window state, which indeed could collide with the flag. I might need to work on the flag parsing first through, it's a bit of mess and probably could be done better with Node's util API (its method is experimental, but should shorten my code a bit and probably it won't break that much).

SpacingBat3 avatar Oct 04 '22 10:10 SpacingBat3

Sorry for the lack of the responsiveness. I'll reopen on this and work once I'll got a time, probably next week or later.

What you wrote makes sense to me, considering there's a mechanism in WebCord to preserve the window state, which indeed could collide with the flag. I might need to work on the flag parsing first through, it's a bit of mess and probably could be done better with Node's util API (its method is experimental, but should shorten my code a bit and probably it won't break that much).

I feel bad I didn't reopened this, I but at least doing it now.

This should remind me to actually fix it (and track when that happens)…

SpacingBat3 avatar Nov 26 '22 17:11 SpacingBat3