From 4ef886f51e689695028c60ad55655e5fc3883ed3 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 6 Apr 2018 15:53:12 +0200 Subject: [PATCH] wayland: Avoid actor updates non actor_surface role wl_surface.commit We used to maintain an actor for cursors, even though we would possibly use hw overlays or even some other overlay actor for those. This happens no more, so check whether we are dealing with an actor-backed surface role before fiddling with it. --- src/wayland/meta-wayland-surface.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 2acebdb0b..c0cef357a 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -641,7 +641,7 @@ meta_wayland_surface_apply_pending_state (MetaWaylandSurface *surface, goto cleanup; } - if (switched_buffer) + if (switched_buffer && meta_wayland_surface_get_actor (surface)) { MetaShapedTexture *stex; CoglTexture *texture; @@ -672,8 +672,9 @@ meta_wayland_surface_apply_pending_state (MetaWaylandSurface *surface, if (pending->scale > 0) surface->scale = pending->scale; - if (!cairo_region_is_empty (pending->surface_damage) || - !cairo_region_is_empty (pending->buffer_damage)) + if (meta_wayland_surface_get_actor (surface) && + (!cairo_region_is_empty (pending->surface_damage) || + !cairo_region_is_empty (pending->buffer_damage))) surface_process_damage (surface, pending->surface_damage, pending->buffer_damage);