Use new clutter_actor_get_resource_scale() API

Update the existing users of clutter_actor_get_resource_scale() to the
new API which doesn't return a boolean value.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1287
This commit is contained in:
Jonas Dreßler
2020-05-28 14:39:11 +02:00
committed by Jonas Ådahl
parent 140ab4dec1
commit cb9842e4a4
6 changed files with 45 additions and 59 deletions

View File

@ -393,8 +393,7 @@ grab_window_screenshot (ClutterActor *stage,
if (meta_window_get_client_type (window) == META_WINDOW_CLIENT_TYPE_WAYLAND)
{
float resource_scale;
if (!clutter_actor_get_resource_scale (window_actor, &resource_scale))
resource_scale = 1.0f;
resource_scale = clutter_actor_get_resource_scale (window_actor);
cairo_surface_set_device_scale (priv->image, resource_scale, resource_scale);
}