texture-cache: Load bound surfaces into StWidgets
Using widgets instead of plain actors will allow us to set the size from CSS. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1027
This commit is contained in:
@ -184,7 +184,7 @@ window_backed_app_get_icon (ShellApp *app,
|
||||
int size)
|
||||
{
|
||||
MetaWindow *window = NULL;
|
||||
ClutterActor *actor;
|
||||
StWidget *widget;
|
||||
gint scale;
|
||||
ShellGlobal *global;
|
||||
StThemeContext *context;
|
||||
@ -204,16 +204,18 @@ window_backed_app_get_icon (ShellApp *app,
|
||||
|
||||
if (window == NULL)
|
||||
{
|
||||
ClutterActor *actor;
|
||||
|
||||
actor = clutter_actor_new ();
|
||||
g_object_set (actor, "opacity", 0, "width", (float) size, "height", (float) size, NULL);
|
||||
return actor;
|
||||
}
|
||||
|
||||
actor = st_texture_cache_bind_cairo_surface_property (st_texture_cache_get_default (),
|
||||
G_OBJECT (window),
|
||||
"icon",
|
||||
size);
|
||||
return actor;
|
||||
widget = st_texture_cache_bind_cairo_surface_property (st_texture_cache_get_default (),
|
||||
G_OBJECT (window),
|
||||
"icon",
|
||||
size);
|
||||
return CLUTTER_ACTOR (widget);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user