Bug 453100 - Icons-Only Task Manager Can Mis-Report Currently Running Applications
Summary: Icons-Only Task Manager Can Mis-Report Currently Running Applications
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager widgets (show other bugs)
Version: 6.1.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-27 19:23 UTC by nekonexus
Modified: 2024-09-20 03:37 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
nekonexus: Wayland?
nekonexus: X11+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nekonexus 2022-04-27 19:23:40 UTC
SUMMARY

This issue is a bit difficult to clearly describe, but I'll try to make it as clear as I can:

Having two .desktop files that can target the same program but execute differently can conflict with one another on the icons-only task manager. For example: if (on Arch Linux) one installs both "steam-runtime" and "steam-native-runtime," they both have their own launch scripts that both launch Steam but in different ways, but because they both have Steam-targeted .desktop files, Plasma (in this example) interprets launching Steam normally via "steam-runtime" as "steam-native-runtime" on the task manager - thereby duplicating a theoretically pinned "steam-runtime" shortcut and instead presenting itself as running "steam-native-runtime" when this is not true.

Another similar example is having two installations of Discord (Discord and Discord Canary), where this issue can also occur the same way.


STEPS TO REPRODUCE
1. Install "steam-runtime"
2. Install "steam-native-runtime"
3. Enable the "Icons-Only Task Manager" applet
4. Pin "steam-runtime" from the applications menu to the Icons-Only Task Manager
5. Run "steam-native-runtime"

OBSERVED RESULT
The Icons-Only Task Manager lies about the currently running (example) process and presents itself as a separate desktop process.

EXPECTED RESULT
The selected application process should be presented as selected and not mis-reported to the user.

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 kdebugzillamail 2024-09-12 13:10:08 UTC
I can confirm this problem to exist.

PROBLEM:
I have two Flatpak installations of Discord. 'com.discordapp.Discord,' and 'com.discordapp.DiscordCanary'. The Canary version is from the Flathub beta repository.
There's a lot of weird behavior when similar applications are launched. I will write some problems out in the Steps to Reproduce section.

STEPS TO REPRODUCE:
1. Launch 'Discord' while having 'Discord Canary' installed.
- Expected Result: 'Discord' will launch and show under the blue 'Discord' logo.
- Observed Result: 'Discord' launches and shows under the yellow 'Discord Canary' logo.
2. Pin 'Discord' to the default panel.
3. Launch 'Discord Canary'.
- Expected Result: 'Discord Canary' will launch under a new, unique taskbar icon, as it is a different app.
- Observed Result: 'Discord Canary' groups up with the other 'Discord' icon.
4. Hover over Discord apps on task bar.
- Expected Result: They're labeled by their app name.
- Observed Result: 'Discord' is labeled 'Discord Canary'. 'Discord Canary' has an empty label.

NOTE
These two apps contain different icons and different desktop files referring to different Flatpak commands. The .sh and exectuable files that are ran also have different names. The only similarity I could find between them, is that their .desktop files both set 'discord' as their 'StartupWMClass'. However, it didn't seem to help when I made them unique.
Comment 2 TraceyC 2024-09-16 19:50:07 UTC
I can confirm this behavior on Plasma-dev, both Wayland and X11 sessions

Steps to reproduce:
- Installed Discord via repo package
- Installed DiscordCanary via flathub-beta

1. Launched Discord, checked icon in Icons-Only-Task-Manager
Icon is correct - the blue Discord icon
2. Pinned the Discord icon
3. Launched Discord Canary
Initially it showed a separate, yellow icon as expected.
The blue icon was highlighted, I clicked on it. This brought up the Discord Canary window. The yellow icon disappeared. Both windows were grouped under the blue icon now.
4. Closed both versions of Discord and started up Canary
During launch, the yellow icon was shown in the task bar. After it completed loading, the icon changed to the blue icon.


**Notes**
I can also reproduce this behavior with Firefox, on 6.1.5, using two different profiles with different .desktop files. This issue has persisted since 6.0 at least.

I have a pinned icon on the taskbar per profile.
Personal - regular Firefox icon
Work - all white Firefox icon

After launching Firefox with the Personal profile, it correctly shows the windows when interacting with its icon in the taskbar
After launching a new Firefox window with the Work profile:
- The icon for the Work profile is still correctly pinned to the task manager
- All windows from both profiles are grouped under the icon for the Personal profile