l-koehler / FF-converter

GUI File Format Converter
https://github.com/ilstam/FF-Multi-Converter
GNU General Public License v3.0
4 stars 0 forks source link

app_id not set to the same value as WM_CLASS #13

Closed Botspot closed 7 months ago

Botspot commented 7 months ago

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 commented 7 months ago

Another app had a similar issue. https://github.com/hongquan/CoBang/issues/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 commented 7 months ago

fixed, thanks!