Window and application icons
This issue was reopened at a request of this comment: #52 (comment 2155722)
Everything below in the issue post is just historic info.
I couldn't find any existing protocols regarding assigning a window or application icon to a surface.
Justification for this feature is for applications which need to dynamically change the application icon.
For the purpose of the issue I use these definitions:
- A window icon may be placed inside of window decorations. Generally this is a small icon.
- An application icon is available for a compositor to use. An application icon may be used in an application switcher or to show what applications are open.
For context, let's see how the de facto way GNOME and KDE seem to get application icons:
- Use the app_ID of the surface to find the .desktop file with the matching app id.
- Use that to directly load the icon somewhere on the system, whether directly or via theming.
This behavior doesn't seem to be strictly defined anywhere I see, hence me calling it de facto. Changing the app id might work on some compositors, but it comes across to me as a hack.
Some things are not clear to me at the moment regarding how a potential protocol for this would look:
- Would this make more sense in xdg_shell or in it's own protocol.
- How would the compositor be given the content of the icon. I was thinking of just making the icon a
wl_surface
with a special application icon or window icon role. Though this would require a way to distinguish between this type of role in the subsurfaces of thexdg_surface
or add a special request to set the icon of thexdg_surface
. Not sure if this is appropriate. Awl_buffer
does not seem appropriate though since you just have a buffer of pixels. Other methods may work, do bring those up if you have ideas.