Closed gantryyork closed 6 months ago
After update, the following have the correct icons in the Dock
After update, the following do not have the correct icon in Dock
A few apps I've noticed that have a default app icon in the dock:
It should be noted that in cosmic app launcher the apps are displayed correctly, and the window where the app is currently open shows up as an entry, but without the icon. Probably related to app grouping issues with their .desktop files
Element
I presume this might be an Electron application? If this is not using a very very recent electron version, those tend to run via Xwayland and setup wm_class
in a way, that doesn't match it's desktop-file. Editing the StartupWMClass
property of the .desktop file to match the app-id might help here.
RStudio (running in a toolbox container)
Applications running in containers usually don't have a .desktop file properly setup on the root file system, so our apps can't really do a lot to figure out the icon.
Note, that for Xwayland apps there is the option to get the icon directly from the client, however these tend to be low-res and are by design not themeable. As such we currently don't support the legacy X11 way of setting icons and require a properly set up desktop-file. Wayland has no equivalent mechanism (yet, see https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/269).
To debug this, you may run the toplevel-list
example client from https://github.com/pop-os/cosmic-protocols (cargo run --example toplevel-list
) to get the App Id
of the running applications. That either needs to match the name of the desktop-file or the StartupWMClass
-key inside.
Note, that for Xwayland apps there is the option to get the icon directly from the client, however these tend to be low-res and are by design not themeable. As such we currently don't support the legacy X11 way of setting icons and require a properly set up desktop-file. Wayland has no equivalent mechanism (yet, see https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/269).
Is implementing the X11 way of setting icons planned?
Note, that for Xwayland apps there is the option to get the icon directly from the client, however these tend to be low-res and are by design not themeable. As such we currently don't support the legacy X11 way of setting icons and require a properly set up desktop-file. Wayland has no equivalent mechanism (yet, see https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/269).
Is implementing the X11 way of setting icons planned?
I am afraid I can't give you a definite answer on this one.
The issue implementing this is two fold:
The first one is rather trivial, the second not really. However if something comes out of the ext-window-icon protocol discussion we surely would want to implement that in cosmic eventually. In which case we need 2. anyway, so doing 1. as well would be relatively easy.
(Technically I believe other apps could also create an X11 connection on their own to get the icon, but I would like to encapsulate that logic in the compositor, so our wayland-native components don't need an otherwise unnecessary X11 connection, and because ext-window-icon wouldn't work like that anyway.)
So the short answers is: Likely, but not a high priority.
It should be noted that I experience what I think is a related issue with this. The app list applet lets you favorite Element, for example, but you can't click the icon in the list to open the app when the app is closed. Probably something related to .desktop files, I imagine
I only see the default icon for most apps in the Dock
These apps have the correct icon