[mutter] wayland/actor-surface: Do not set opaque region for XWayland clients
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/actor-surface: Do not set opaque region for XWayland clients
- Date: Wed, 12 Feb 2020 20:16:18 +0000 (UTC)
commit 19814497767f5ce41ee282c17e290415e88e447c
Author: Robert Mader <robert mader posteo de>
Date: Wed Feb 12 01:48:29 2020 +0100
wayland/actor-surface: Do not set opaque region for XWayland clients
XWayland clients get their opaque region set from their window, not the
surface. Doing both resulted in the surface constantly overwriting the
opaque region - effectively disabling culling of XWayland clients.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1049
src/wayland/meta-wayland-actor-surface.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/src/wayland/meta-wayland-actor-surface.c b/src/wayland/meta-wayland-actor-surface.c
index c25f4ca39..4606ae6cd 100644
--- a/src/wayland/meta-wayland-actor-surface.c
+++ b/src/wayland/meta-wayland-actor-surface.c
@@ -194,18 +194,22 @@ meta_wayland_actor_surface_real_sync_actor_state (MetaWaylandActorSurface *actor
meta_surface_actor_set_input_region (surface_actor, NULL);
}
- if (surface->opaque_region)
+ if (surface->window &&
+ surface->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
{
- cairo_region_t *opaque_region;
-
- opaque_region = cairo_region_copy (surface->opaque_region);
- cairo_region_intersect_rectangle (opaque_region, &surface_rect);
- meta_surface_actor_set_opaque_region (surface_actor, opaque_region);
- cairo_region_destroy (opaque_region);
- }
- else
- {
- meta_surface_actor_set_opaque_region (surface_actor, NULL);
+ if (surface->opaque_region)
+ {
+ cairo_region_t *opaque_region;
+
+ opaque_region = cairo_region_copy (surface->opaque_region);
+ cairo_region_intersect_rectangle (opaque_region, &surface_rect);
+ meta_surface_actor_set_opaque_region (surface_actor, opaque_region);
+ cairo_region_destroy (opaque_region);
+ }
+ else
+ {
+ meta_surface_actor_set_opaque_region (surface_actor, NULL);
+ }
}
meta_surface_actor_set_transform (surface_actor, surface->buffer_transform);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]