SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** STEPS TO REPRODUCE 1. Have multiple Electron apps with tray icons open, e.g. Discord and Element 2. Right click the system tray and select "Configure System Tray" 3. Set Discord's tray icon to "always hidden" OBSERVED RESULT The tray icon for Discord AND Element are hidden EXPECTED RESULT The tray icon for only Discord is hidden, while Element's remains because the user did not set Element's to "always hidden" SOFTWARE/OS VERSIONS Linux: Arch Linux (available in About System) KDE Plasma Version: 5.27.5 KDE Frameworks Version: 5.106.0 Qt Version: 5.15.9 ADDITIONAL INFORMATION
Are both apps distro-packaged apps, or both Flatpak or Snap, or both installed from different packaging systems?
Tl;DR Electron bad Both register their StatusNotifierItem with Id "chrome_status_icon_1". Plasma uses the Id to store which ones are hidden, so changing one will affect both
Is there some alternative metadata we can take into account in this kind of ambiguous case?
>Is there some alternative metadata we can take into account in this kind of ambiguous case? You do have the host dbus address, from that we can query the PID, from that we can get anything we normally get from a PID. We would have to hardcode the case of getting "chrome_status_icon_1" to know when to look for alternative metadata, so it's extremely hacky. As a non-hack, patch chrome?
Fixing chrome would be ideal, yeah. But in principle a collision could happen with other apps too, so I don't think we would necessarily have to hardcode a check for "chrome_status_icon_1". Instead, check if there are any non-unique Id values, and for those, apply the disambiguating factor.
>Instead, check if there are any non-unique Id values, and for those, apply the disambiguating factor. I don't see how that can work. I run discord, I save a setting, I close discord. I then run electron. From a Plasma POV have I just opened electron or have I opened chrome again?
* opened Discord again
Oh, I see what you mean. Yeah.
This is a bug in Electron or Chrome right? The indicator Id should be set to something related to the name of the app rather than blanket `chrome_status_icon_1` for all apps. Some time ago (~7 years) there was a fix submitted to Electron to set the tray icon id to the app name: https://github.com/electron/electron/pull/6145/files Obviously the APIs used here are long out of date, but this possibly confirms that this should be handled in Electron (?) Note that can't find anything in the electron docs for manually setting tray icon id, but if there was a way of setting this from the electron app, then this could possibly be fixed in each individual app by explicitly setting an id.
*** Bug 492846 has been marked as a duplicate of this bug. ***
Created attachment 173690 [details] Showcase (icons)
Created attachment 173691 [details] Showcase (settings) Signal - show if needed Teams - always show Discord - always hide
Pls fix <3
*** Bug 468319 has been marked as a duplicate of this bug. ***
*** Bug 494526 has been marked as a duplicate of this bug. ***
*** Bug 498662 has been marked as a duplicate of this bug. ***
*** Bug 500238 has been marked as a duplicate of this bug. ***