Bug 436465 - Cannot pin certain apps to task-manager
Summary: Cannot pin certain apps to task-manager
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: 5.21.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-01 18:55 UTC by Chef Niko
Modified: 2022-09-15 14:15 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
requested output from xprop, then clicking on "zerobrane studio" application (43.15 KB, text/plain)
2021-05-05 22:56 UTC, Chef Niko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chef Niko 2021-05-01 18:55:49 UTC
SUMMARY
Certain applications fail to pin to the task manager. This problem exists for both the task manager, and the icons only task manager. One such application is "ZeroBrane Studio". 

STEPS TO REPRODUCE
1. Launch application
2. Attempt to pin application to task manager

OBSERVED RESULT
Fails to pin to task manager.

EXPECTED RESULT
Pin to task manager succeeds.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 21.04 5.11.0-16-generic x64
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
"Zerobrane Studio" was pinnable to task manager before upgrading Ubuntu/KDE.
Comment 1 Nate Graham 2021-05-03 19:37:08 UTC
When you say, "Attempt to pin application to task manager" what do you mean exactly? How are you doing it?
Comment 2 Chef Niko 2021-05-03 23:58:01 UTC
Method 1:
1. Launch application
2. Right click application entry in the task bar
3. Mouse over "Pin To Task Manager"
4. Click box of the activity to pin the application on

Method 2:
1. Launch Application
2. Drag application entry on the task bar on to a panel

Neither of these methods produce the desired result. My apologies for not being more detailed originally.
Comment 3 Nate Graham 2021-05-04 18:48:31 UTC
So the menu action is enabled and you can click on it, but it doesn't actually work?
Comment 4 Chef Niko 2021-05-05 01:28:07 UTC
That's correct. When I click on it, nothing appears to happen. Here are my observations:

1. Menu closes (expected)
2. When opening up the menu again, the box is not filled in (unexpected, box should be filled in)
3. Upon closing the application, it is removed from the task manager (unexpected, it is expected to remain pinned).

Other functions on other menus seem to work fine. E.g. "More Actions" -> "Keep Below Others". When clicking on this, the corresponding box is filled in, and the window is indeed kept below other windows.
Comment 5 Chef Niko 2021-05-05 12:21:11 UTC
While I filed this bug against the task manager, I'm not sure that is correct.

When I drag the application directly on to a panel (not the task manager), the same lack of result (failure) is occurring. I don't really know how the KDE components are coded, but this suggests to me that the panel, task manager, and icon only task manager are all calling a shared function to "pin" an icon to them, which is where the problem is occurring. 

Hopefully this helps clarify things, and I apologize if I chose the wrong component for this bug.
Comment 6 David Edmundson 2021-05-05 16:28:48 UTC
This will happen if the application cannot be matched to the .desktop file used for launching that application.

Please include output of  "xprop" and clicking on a window of said broken application.
Comment 7 Chef Niko 2021-05-05 22:56:47 UTC
Created attachment 138181 [details]
requested output from xprop, then clicking on "zerobrane studio" application

I've included the output in the attached file 'xprop-zerobrane-studio', as requested. It was generated by running `xprop >> xprop-zerobrane-studio` in Konsole, then clicking on the 'Zerobrane Studio' Application, which is not pinning.
Comment 8 David Edmundson 2021-05-05 23:50:08 UTC
>WM2DesktopFileName
 is not present

even our fallback WM_CLASS is unhelpful

>WM_CLASS(STRING) = "lua", "Lua"

There is a massive tonne of fallback guesswork in libtaskmanager, you can read the comments of windowUrlFromMetadata in taskstools.cpp trying all sorts of sources, but ultimately if we don't have enough data we can't do a lot.

As a workaround you can expand ~/.config/taskmanagerrulesrc with additional mapping

Please report to zerobrane to populate their metadata.