Bug 438222 - Task Manager doesn't update title of window under specific conditions
Summary: Task Manager doesn't update title of window under specific conditions
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: 5.21.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-06-07 19:34 UTC by i.Dark_Templar
Modified: 2023-04-26 15:30 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.22.1


Attachments
screenshot.png (214.25 KB, image/png)
2021-06-07 19:34 UTC, i.Dark_Templar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description i.Dark_Templar 2021-06-07 19:34:39 UTC
Created attachment 139089 [details]
screenshot.png

SUMMARY
After upgrading to Plasma/X11 5.21.5 I've noticed that title of Audacious player on taskbar doesn't update when next audio file is playing.

STEPS TO REPRODUCE
1. Use Audacious with Qt5 classic winamp-like interface. Tested this with Audacious 4.1.
2. Ensure there are only 2 windows of Audacious are present: main window and playlist window.
3. Start playing audio file in Audacious. If it's first song, title of Audacious might be updated to reflect name of audio file.
4. Make Audacious play another audio file or pause/stop playing. Any way is fine: using 'next track', 'previous track', 'pause' or 'stop' buttons, clicking on another audio file in playlist or just waiting until current audio file is finished and next one is started.

OBSERVED RESULT
Title of Audacious on task panel doesn't update.

EXPECTED RESULT
Title of Audacious on task panel should update to reflect name of current track or state of playback.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Plasma/X11
(available in About System)
KDE Plasma Version:  5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
It worked fine with KDE Plasma 5.20.5. Downgrading fixes this issue for me.

Attaching screenshot with Audacious and part of tasks panel. Name of audio file in main window and playlist window doesn't match name of audio file on tasks panel in the bottom of screenshot.

Running "xprop" on main Audacious window shows correct window name. When switching to different window via "alt+tab" key combination, correct window name is displayed in task manager.

If Audacious has only one window, i.e. there is main window and no playlist window, it updates name fine.
Comment 1 Kai Uwe Broulik 2021-06-07 19:38:13 UTC
Yeah I've also occasionally noticed one of my browser windows in task bar not updating, which remains even if I move the task items around. Only causing the delegate to be re-created fixes the problem. Never managed to reliably reproduce it with Chrome.
Comment 2 i.Dark_Templar 2021-06-07 19:51:11 UTC
For me it reproduces always with Audacious in described scenario.
Comment 3 Kai Uwe Broulik 2021-06-07 19:59:17 UTC
Can confirm with Audacious in WinAmp mode. I can see the model not updating in GammaRay, so bug is in XWindowTasksModel, not the taskmanager applet.
Comment 4 Kai Uwe Broulik 2021-06-07 20:08:34 UTC
Are you downgrading just Plasma? I don't see a KWindowSystem::windowChanged signal being emitted for the Audacious window, suggesting a bug in KWindowSystem, which is in Frameworks. Not sure..
Comment 5 i.Dark_Templar 2021-06-07 20:11:54 UTC
Yes, I've tried downgrading Plasma to 5.20.5 while keeping kde-frameworks at 5.82.0, and it worked for me.
Comment 6 i.Dark_Templar 2021-06-07 20:21:07 UTC
(In reply to Kai Uwe Broulik from comment #3)
> Can confirm with Audacious in WinAmp mode. I can see the model not updating
> in GammaRay, so bug is in XWindowTasksModel, not the taskmanager applet.

Thanks for pointing this out. I've looked into diff in related file between v5.20.5 and v5.21.5. There wasn't much of changes. Reverting commit 4700608e8a8ef59b5f3af51267d59ba35cffb395 fixed issue for me. There were some revert conflicts due to reformatting of code. Not sure if issue is in that code or if it just unveils a bug in another place.
Comment 7 Nate Graham 2021-06-08 19:24:53 UTC
Henri, you wrote https://invent.kde.org/plasma/plasma-workspace/-/commit/4700608e8a8ef59b5f3af51267d59ba35cffb395; could you please investigate? Thanks!
Comment 8 hchain 2021-06-10 15:51:16 UTC
You're correct, the commit introduced a bug.

Fixed in https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/924

Now you should have the title work as expected, and also switching from any app to the *playlist* window should mark audacious as the current focused task as expected (this didn't work before).
Comment 9 i.Dark_Templar 2021-06-12 08:57:36 UTC
Thank you. Linked patches fix issue for me too.
Comment 10 Nate Graham 2021-06-14 16:10:06 UTC
Git commit 7573ae03acc3f3c6d70af24970e689414a4204c5 by Nate Graham, on behalf of Henri Chain.
Committed on 14/06/2021 at 16:10.
Pushed by ngraham into branch 'master'.

[libtaskmanager/x11] Fix transient windows bug

The logic for handling the active window when it is a transient, added in
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/509, had
a bug (fixed in 67003f740888fa9d1bcee60cd28ce9a862d2452a).

This reworks the implementation and actually makes the original feature work
(a signal also wasn't properly handled).
FIXED-IN: 5.22.1

M  +19   -20   libtaskmanager/xwindowtasksmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/7573ae03acc3f3c6d70af24970e689414a4204c5
Comment 11 Nate Graham 2021-06-14 16:10:53 UTC
Git commit 2a1f9e4489687fa276c20bddf05d3eedb0994b00 by Nate Graham, on behalf of Henri Chain.
Committed on 14/06/2021 at 16:10.
Pushed by ngraham into branch 'Plasma/5.22'.

[libtaskmanager/x11] Fix transient windows bug

The logic for handling the active window when it is a transient, added in
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/509, had
a bug (fixed in 67003f740888fa9d1bcee60cd28ce9a862d2452a).

This reworks the implementation and actually makes the original feature work
(a signal also wasn't properly handled).
FIXED-IN: 5.22.1


(cherry picked from commit 7573ae03acc3f3c6d70af24970e689414a4204c5)

M  +19   -20   libtaskmanager/xwindowtasksmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/2a1f9e4489687fa276c20bddf05d3eedb0994b00
Comment 12 Menno 2023-04-26 15:28:08 UTC
I experience the same with Chrome, so this bug is either not fixed or a regression.
After a while, switching tabs no longer updates the task manager icon's title to reflect the currently viewed tab of Chrome.
Steps to reproduce: just use Chrome for a couple of hours.

Kubuntu 23.04
KDE Plasma Version 5.27.4
KDE Frameworks Version 5.104.0
Qt Version 5.15.8

(Which genius has made it so I can't copy this info anymore from the "About this System" part of System settings?)
Comment 13 Nate Graham 2023-04-26 15:30:33 UTC
This is a fairly old bug report and the code has changed a lot since it was reported. There's a very good chance the issue you're experiencing is caused by something else, even if the outward symptoms look and feel the same. Can you please submit a new bug report? Thank you!

FWIW...
> (Which genius has made it so I can't copy this info anymore from the "About
> this System" part of System settings?)
You can; the individual labels are selectable. In addition, there is a big giant "Copy to Clipboard" button at the bottom of the window that can be used to copy everything all at once.