From 36b361617dd9fc19e273592a4bee479d82640765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 7 Jun 2019 15:51:45 +0200 Subject: [PATCH] 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 --- src/wayland/meta-wayland-cursor-surface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-cursor-surface.c b/src/wayland/meta-wayland-cursor-surface.c index df3e34510..76268d5f2 100644 --- a/src/wayland/meta-wayland-cursor-surface.c +++ b/src/wayland/meta-wayland-cursor-surface.c @@ -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)); }