wayland/cursor-surface: Update sprite when attaching NULL

Attaching a NULL buffer should hide the cursor sprite. In these cases,
we we'll have neither surface nor buffer damage, so also update when we
just attached a NULL buffer.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/630


(cherry picked from commit 36b361617dd9fc19e273592a4bee479d82640765)
This commit is contained in:
Jonas Ådahl 2019-06-07 13:51:45 +00:00 committed by Georges Basile Stavracas Neto
parent e716f9d143
commit 07c9cd498d

View File

@ -170,8 +170,9 @@ meta_wayland_cursor_surface_commit (MetaWaylandSurfaceRole *surface_role,
wl_list_init (&pending->frame_callback_list);
if (pending->newly_attached &&
(!cairo_region_is_empty (pending->surface_damage) ||
!cairo_region_is_empty (pending->buffer_damage)))
((!cairo_region_is_empty (pending->surface_damage) ||
!cairo_region_is_empty (pending->buffer_damage)) ||
!priv->buffer))
update_cursor_sprite_texture (META_WAYLAND_CURSOR_SURFACE (surface_role));
}