shell-app: Use container widget for fallback X11 app icons
Just like StIcon does, we should use a container widget for the fallback app icon that we get using the cairo surface property. It's needed because the widget returned by shell_app_create_icon_texture() can be resized freely, while we want the aspect ratio of the actual texture to remain the same. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2578
This commit is contained in:
parent
6b7c85b079
commit
85846d88f0
@ -218,10 +218,17 @@ window_backed_app_get_icon (ShellApp *app,
|
|||||||
|
|
||||||
if (meta_window_get_client_type (window) == META_WINDOW_CLIENT_TYPE_X11)
|
if (meta_window_get_client_type (window) == META_WINDOW_CLIENT_TYPE_X11)
|
||||||
{
|
{
|
||||||
widget = st_texture_cache_bind_cairo_surface_property (st_texture_cache_get_default (),
|
StWidget *texture_actor;
|
||||||
|
|
||||||
|
texture_actor =
|
||||||
|
st_texture_cache_bind_cairo_surface_property (st_texture_cache_get_default (),
|
||||||
G_OBJECT (window),
|
G_OBJECT (window),
|
||||||
"icon",
|
"icon",
|
||||||
scaled_size);
|
scaled_size);
|
||||||
|
|
||||||
|
widget = g_object_new (ST_TYPE_BIN,
|
||||||
|
"child", texture_actor,
|
||||||
|
NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user