Bug 496041 - Setting a desktop file name for window without a class, causing taskbar icon not being merged with the one I pinned
Summary: Setting a desktop file name for window without a class, causing taskbar icon ...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: rules (other bugs)
Version First Reported In: 6.1.5
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-10 06:26 UTC by flysoftbeta
Modified: 2025-03-18 06:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
two spotify icons, that are not merging into one (51.15 KB, image/png)
2024-11-10 06:26 UTC, flysoftbeta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description flysoftbeta 2024-11-10 06:26:11 UTC
Created attachment 175699 [details]
two spotify icons, that are not merging into one

SUMMARY
There are some Wayland apps (e.g. Flatpak version of Spotify) that does not have a window class, resulting the inability to Pin to Taskbar, and getting a generic wayland icon, so I wrote a window rule matching it using its title and set it a desktop file name. And the app's taskbar icon not being merged with the another I pinned from launcher. Pretty sure they point to the same .desktop file.

STEPS TO REPRODUCE
1. flatpak install com.spotify.Client & flatpak override --user --socket=wayland com.spotify.Client 
2. create a window rule (attached at ADDITIONAL INFORMATION)
3. pin Spotify from launcher
3. start it and you would got two icons

OBSERVED RESULT
You got two icons. And the one from app's window has the Pin to taskbar greyed out.

EXPECTED RESULT

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.10.13-3-MANJARO 
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
```
desktopfile=com.spotify.Client.desktop
desktopfilerule=2
title=Spotify Free
titlematch=1
types=1
wmclassmatch=1
```
Comment 1 Bug Janitor Service 2025-03-17 15:37:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7357
Comment 2 Vlad Zahorodnii 2025-03-18 06:56:38 UTC
Description=Window settings for spotify
desktopfile=com.spotify.Client
desktopfilerule=2
title=Spotify Premium
types=1
wmclass=\sspotify
wmclasscomplete=true
wmclassmatch=1


works for me. I think the problem is that you have ".desktop" in the desktop file name, it should contain the basename, i.e. filename without .desktop