Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-09-29 23:58:21

espas
Member
Registered: 2021-09-29
Posts: 31

Window buttons not showing the proper icon

I'm using the Papirus icon theme and menu icons are working fine, but some apps are still showing their original icons in the window buttons panel plugin. Is there a way to fix that? I had a similar problem on KDE with a single application and all I had to do was add a StartupWMClass line in the .desktop file but this doesn't seem to work in Xfce.

Offline

#2 2021-09-30 00:27:00

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: Window buttons not showing the proper icon

Hello and welcome.

Which version of Xfce are you running?

Also, which apps are having this issue? Are any of them flatpak apps? For one of the problem apps, run "xprop" and when the cursor changes to a +, click on the problem window. See if the window itself exposes any useful identifying information.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2021-09-30 00:45:52

espas
Member
Registered: 2021-09-29
Posts: 31

Re: Window buttons not showing the proper icon

ToZ wrote:

Hello and welcome.

Which version of Xfce are you running?

Also, which apps are having this issue? Are any of them flatpak apps? For one of the problem apps, run "xprop" and when the cursor changes to a +, click on the problem window. See if the window itself exposes any useful identifying information.

I'm using Xfce 4.16.

The apps I'm having issues with are kitty, calibre, pidgin, gnome calculator and keepassxc. There could be more. None of them are flatpaks or snaps, all of them are from Fedora repositories. I cannot identify nothing wrong when I use xprop on their windows.

Offline

#4 2021-09-30 01:19:55

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: Window buttons not showing the proper icon

Sorry, I misread your initial post. I don't think StartWMClass is supported (there is this old bug report).

You have two options here: 1) create the missing icons in the Papirus theme for these apps, or 2) use devilspie to change WM_CLASS on startup.

Edit: This might also be useful.

Last edited by ToZ (2021-09-30 01:22:02)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2021-09-30 02:38:18

espas
Member
Registered: 2021-09-29
Posts: 31

Re: Window buttons not showing the proper icon

ToZ wrote:

Sorry, I misread your initial post. I don't think StartWMClass is supported (there is this old bug report).

You have two options here: 1) create the missing icons in the Papirus theme for these apps, or 2) use devilspie to change WM_CLASS on startup.

Edit: This might also be useful.

These apps already have Papirus icons and they show just right in the menu, but not on panel window buttons. I don't understand why changing the WM_CLASS would help, it seems like they already have the right WM_CLASS.

Offline

#6 2021-09-30 06:06:17

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: Window buttons not showing the proper icon

Hmm.This is interesting. Since I don't use any of those apps, I installed gnome-calculator and calibre to have a look. And I can replicate what you are seeing. Interesting that I don't see this issue with the current set of apps that I use.

Upon further investigation, it seems that xfce4-panel and xfwm4 (Alt-Tab) are using the symbolic versions of the icons. For gnome-calculator, that would be the icon in the Papirus/symbolic/apps folder and for Calibre, since Papirus doesn't have a symbolic icon for this app, it falls back to the icon in the hicolor theme. The application menus, on the other hand, are using the non-symbolic icons.

There were some changes made back in 2019 to account for missing icon info from applications (xfm4 & xfce4-panel) but that logic doesn't seem to work here.

The other thing I notice is that for the gnome-calculator and calibre, xprop doesn't show any icon info. I wonder if there is an issue with the icon logic here.

Perhaps best to create a bug report against xfwm4 and xfce4-panel specific to this issue to see what the developers say.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2021-09-30 08:17:42

MitraMai
Member
Registered: 2019-10-02
Posts: 7

Re: Window buttons not showing the proper icon

Take a look at this post, I managed to solve a similar issue: https://forum.xfce.org/viewtopic.php?id=15220

Offline

#8 2021-09-30 16:00:39

espas
Member
Registered: 2021-09-29
Posts: 31

Re: Window buttons not showing the proper icon

MitraMai wrote:

Take a look at this post, I managed to solve a similar issue: https://forum.xfce.org/viewtopic.php?id=15220

I just tried your fix, but unfortunately it didn't work. I placed .png images of the kitty terminal icon in both /usr/share/icons/hicolor/32x32/apps/ and the .local/share/icons/hicolor/32x32/apps/ and updated the cache but it didn't work.

Offline

#9 2021-10-01 17:57:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: Window buttons not showing the proper icon

I'm starting to lean towards those apps not properly setting the icon resource in their apps. If you use xseticon to set the icon resource, then everything works fine in Xfce.

Edit:
Example (gnome-calculator):
Ensure that xseticon is installed and put a png version of the icon in /usr/local/share/icons called "gnome-calculator.png"

Create the following file in /usr/local/bin called "gnome-calculator" and make it exectuable:

#!/bin/bash

# edit these values to suit
ICON=/usr/local/share/icons/gnome-calculator.png
PROG=/usr/bin/gnome-calculator

# don't change anything below
function seticon
{
	sleep .5

	activeWinLine=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)")
	activeWinId="${activeWinLine:40}"

	xseticon -id "$activeWinId" "$ICON"
}

"$PROG" & seticon

Last edited by ToZ (2021-10-01 19:03:12)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 8 queries executed - Memory usage: 554.45 KiB (Peak: 571.3 KiB) ]