Giant icon blocking all the buttons
In some circumstances, the appmenu's icon is heavily oversized, looking terrible and obscuring the window buttons:
The bug only occurs on X11, only with server-side decorated windows, and only with apps that have an appmenu. gnome-terminal
is such a choice.
Furthermore, it also depends on the icon theme on some weird (yet to be investigated) ways. I can reproduce on Ubuntu Artful using its default Humanity icon theme, only when the supposedly irrelevant GNOME icon theme is not installed. As far as Mutter is concerned, what is relevant here is that for some mysterious reason _NET_WM_ICON only contains 48x48 size in this case, no 16x16 or any other size.
When Mutter loads the icon from _NET_WM_ICON, it picks the closest (but bigger, if possible) size for the "icon" (96x96) and "mini-icon" (16x16) properties. The documentation of the properties incorrectly states that these are exact sizes, whereas these are just the preferred ones.
Scaling occurs when the icon is actually displayed. Here cairo_scale
is called with reciprocal scaling parameters. Instead of scaling by 1/3, to get from the actual 48x48 to the desired 16x16 size for the mini icon, it scales by 3, resulting in 144x144.
See Launchpad 1724250 and then continued in 1718238 for the detailed investigation and further information that are probably not really relevant at this point.
Fix to the issue: