Bug 427979 - Wrong icons in many windows after the Telegram identification fix
Summary: Wrong icons in many windows after the Telegram identification fix
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.20.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-10-19 14:02 UTC by Felix Yan
Modified: 2020-11-09 14:31 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.20.03


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Yan 2020-10-19 14:02:52 UTC
SUMMARY
After upgrading kwin from 5.19.5 to 5.20.0, many windows' icons in task switcher and window decoration became a game's. The game is installed via Steam, and I got at least another report of this problem in a local group.

The corresponding icon in plasma taskbar is not affected, though.

I have tried to revert https://github.com/KDE/kwin/commit/7ea7aa1ee901921ca4f15e35e07ca8247af7e95b manually (having some conflicts) and the problem goes away.

STEPS TO REPRODUCE
Not exactly sure why was the wrong icon chosen in the new codepath, so I am currently unable to provide a way to reproduce.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux x86_64, Plasma 5.20.0
(available in About System)
KDE Plasma Version: 5.20.0
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Comment 1 Felix Yan 2020-10-19 14:34:26 UTC
Turns out the wrong icon comes from /home/<username>/.local/share/applications/.desktop which should be generated by steam. Unfortunately steam is not open sourced.

I guess kwin should add some guards against choosing this file as the application name is effectively empty?
Comment 2 Nate Graham 2020-10-21 03:09:46 UTC
Are you able to mention which game causes this to happen when it's running?
Comment 3 Felix Yan 2020-10-21 08:10:47 UTC
(In reply to Nate Graham from comment #2)
> Are you able to mention which game causes this to happen when it's running?

The offending game here is "中国式家长" (or "Chinese Parents" in English). The desktop file should be generated by steam itself on installation (there is a checkbox to add it to "Start Menu").

I suspect that it has something to do with the non-ascii characters here.
Comment 4 Nate Graham 2020-10-21 20:56:07 UTC
Interesting. Definitely seems like it could be related.
Comment 5 Christoph Feck 2020-11-05 22:09:10 UTC
Is the issue in libtaskmanager or kwin?
Comment 6 Bug Janitor Service 2020-11-06 01:45:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/431
Comment 7 Aleix Pol 2020-11-06 01:46:27 UTC
@Felix, would you be able to test the MR above?
Comment 8 Felix Yan 2020-11-06 15:25:36 UTC
I can confirm that the MR fixes the issue here. Many thanks!
Comment 9 Aleix Pol 2020-11-07 03:18:35 UTC
Git commit a92ce693ec7646cb296e9d16ec8cf9cca8121486 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 07/11/2020 at 03:17.
Pushed by apol into branch 'master'.

Restore empty filename check

Otherwise we could end up matching with a weird ".../.desktop" entry.

M  +4    -0    abstract_client.cpp

https://invent.kde.org/plasma/kwin/commit/a92ce693ec7646cb296e9d16ec8cf9cca8121486
Comment 10 Aleix Pol 2020-11-07 03:19:16 UTC
Git commit 0b5cbe4016bc69e4f15e437838983beacae3eab8 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 07/11/2020 at 03:19.
Pushed by apol into branch 'Plasma/5.20'.

Restore empty filename check

Otherwise we could end up matching with a weird ".../.desktop" entry.


(cherry picked from commit a92ce693ec7646cb296e9d16ec8cf9cca8121486)

M  +4    -0    abstract_client.cpp

https://invent.kde.org/plasma/kwin/commit/0b5cbe4016bc69e4f15e437838983beacae3eab8