Skip to content

Draft: Fix missing fallback icons for X11 apps

This is one possible way of fixing #3327 (closed). I would try to implement async loading of the icon if this is the solution we want to go with, so I'm marking this as a draft for now. Here is the description of the problem and the solution from the commit message:

X11 windows of window backed applications that do not have an icon set
by the time the app tracker is first asked to create an icon texture for
them, will never have a (visible) icon texture. This is due to the
surface behind the MetaWindow::icon property not being an image surface,
leading st_texture_cache_reset_texture to create the StImageContent with
a preferred size of 0, which means that all following updates to the
icon will done with this invisible StImageContent.

Also there was no fallback icon set for the cases that never receive an
icon in the window backed X11 case.

This fixes both cases by creating an image surface using a specified
fallback icon when no valid surface can be found.

An alternative solution could be to change mutter to set MetaWindow::icon to a surface with the fallback icon if no icon is specified.

A good way of testing this is to use xterm after deleting/hiding its .desktop file. It does not set any icon by itself, but xseticon can be used to set some icon manually to simulate icon updates at run time.

Merge request reports