Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app_id not set to the same value as WM_CLASS #13

Closed
Botspot opened this issue Apr 5, 2024 · 2 comments
Closed

app_id not set to the same value as WM_CLASS #13

Botspot opened this issue Apr 5, 2024 · 2 comments

Comments

@Botspot
Copy link

Botspot commented Apr 5, 2024

the PiOS Bookworm wayland system tries to set an appropriate app icon based on the WM_CLASS if the app is using Xwayland, or the app_id if running on Wayland.

In case you are not sure, FF-Converter does use native Wayland on systems that support it.

Xwayland result:

Here's how to force any program to make an x11 window and be displayed with xwayland:

WAYLAND_DISPLAY='' XDG_SESSION_TYPE=x11 ffconverter

Then in another terminal, to check its WM_CLASS:

sudo apt install wmctrl -y
wmctrl -lx

The output from wmctrl -lx includes this line: 0x01600006 0 ffconverter.FF Multi Converter raspberrypi FF-Converter
So the WM_CLASS is set to ffconverter.FF Multi Converter.
And as a result of a useful value of WM_CLASS, the Wayfire compositor locates a good icon for the program, as can be seen here on this screenshot of my taskbar.
20240404_20h59m30s_grim

Wayland result:

Now just run ffconverter normally without those other variables set, and notice that the taskbar icon is left blank:
20240404_21h04m19s_grim

I am not aware of a command equivalent to wmctrl to check what the wayland app_id is being set to, but here's a way to do it:

WAYLAND_DEBUG=1 ffconverter 2>&1 | grep set_app_id

And this was the output: [3042681.165] -> xdg_toplevel@26.set_app_id("com/l-koehler/FF-converter.https://github.python3")

I would imagine that the app_id is not currently being manually set by you, but instead, a default value is being chosen by python3.

TL;DR

This is a request to see if it is possible to manually set the app_id to ffconverter.FF Multi Converter to make the app icon work on wayland.

@Botspot
Copy link
Author

Botspot commented Apr 5, 2024

Another app had a similar issue. hongquan/CoBang#87
As that app is also written in python, if you are not sure what to change, maybe the recent commits on that repo would give you a good direction to start.

@l-koehler
Copy link
Owner

fixed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants