Bug 402762

Summary: Task manager lib does not detect properly the "sxiv" appName
Product: [Plasma] plasmashell Reporter: Michail Vourlakos <mvourlakos>
Component: Task Manager and Icons-Only Task ManagerAssignee: Eike Hein <hein>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kde, lemmyg, plasma-bugs
Priority: NOR    
Version: 5.14.4   
Target Milestone: 1.0   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Michail Vourlakos 2019-01-01 18:45:24 UTC
SUMMARY
as reported at: https://github.com/psifidotos/applet-window-title/issues/28

sxiv is an image viewer, its desktop file is called sxiv.desktop but in order for the plasma libtaskmanager to detect its appName properly it needs in the desktop file:

StartupWMClass=sxiv

I am reporting this because I thought that for desktop files that StartupWMClass is not present the desktop filename is used instead.


STEPS TO REPRODUCE
1. execute: sxiv "icon-file"
2. notice the appName in the taskmanager e.g. at previews, it is empty


EXPECTED RESULT
appName should be sxiv
Comment 1 Kai Uwe Broulik 2019-01-09 10:46:26 UTC
It seems the DesktopEntryName and Name are only checked when there is a mapping rule, which there is not:

> // Try matching mapped name against DesktopEntryName.
> if (!mapped.isEmpty() && services.isEmpty()) {

Most of the time TM finds a task because of the PID, covering this (bug? oversight?), but since sxiv doesn't have a PID property on its windows, we fail to find any service for it.

The other code related to DesktopEntryName further down explicitly disregards sxiv.desktop:

> if (!service->desktopEntryName().endsWith("." + appId)) {
>     it.remove();
Comment 2 galder 2022-01-30 15:47:26 UTC
Looks like an old issue. Setting it to needs more info.
Please try with a newer version(plasma 5.23.5) and if this is not an issue any more let us know.
Bugs placed into NEEDSINFO status will receive a reminder if the ticket:

    Is at least 15 days old
    Has not received any comment within 15 days

If a bug remains in NEEDSINFO for another 15 days with no comment, it will be closed as RESOLVED > WORKSFORME.
If a bug remains in NEEDSINFO with a comment provided within less than 15 days, no action will be taken (as it does not meet the above criteria).
Comment 3 Bug Janitor Service 2022-02-14 04:36:29 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2022-03-01 04:36:41 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!