diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2018-04-06 15:53:12 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2018-04-23 13:21:36 +0200 |
commit | bebf5ac382df358bbf94e767ca0abe520eec6fda (patch) | |
tree | a8ed2bfacd15b99d059e62c150136420582dc3bb | |
parent | fa8ce348e6a131fb088f949400d566bebd7d5890 (diff) | |
download | mutter-wip/carlosg/lazy-surface-actor-creation.tar.gz |
wayland: Avoid actor updates non actor_surface role wl_surface.commitwip/carlosg/lazy-surface-actor-creation
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.
-rw-r--r-- | src/wayland/meta-wayland-surface.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index c0e423fd5..30022c153 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); |