[mutter/gnome-3-32] wayland/cursor-surface: Update sprite when attaching NULL



commit 07c9cd498df4082fc79b9a920e539f420d659cbf
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Jun 7 13:51:45 2019 +0000

    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)

 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 d46b3511f..ceeafade0 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));
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]