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.
This commit is contained in:
Carlos Garnacho 2018-04-06 15:53:12 +02:00
parent 22485ba36f
commit 4ef886f51e

View File

@ -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);