cursor-renderer: Realize texture before using it for its size

If we don't, well return an empty size, despite it in practice
shouldn't.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2777>
This commit is contained in:
Jonas Ådahl 2023-01-25 18:44:29 +01:00
parent 6d0b682d98
commit 7fea24d585

View File

@ -338,6 +338,7 @@ meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
int width, height; int width, height;
float texture_scale; float texture_scale;
meta_cursor_sprite_realize_texture (cursor_sprite);
texture = meta_cursor_sprite_get_cogl_texture (cursor_sprite); texture = meta_cursor_sprite_get_cogl_texture (cursor_sprite);
if (!texture) if (!texture)
return (graphene_rect_t) GRAPHENE_RECT_INIT_ZERO; return (graphene_rect_t) GRAPHENE_RECT_INIT_ZERO;