From cef1a5d3777662be490987aac16d6b5d744d0c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 25 May 2023 12:50:51 +0200 Subject: [PATCH] wayland/actor-surface: Only set input region of non-X11 window actors Xwayland nevers sets the input region since that is handled using `XShapeGetRectangles()` called with `ShapeInput`. Setting it from the wl_surface would mean setting it to "infinite", effectively undoing what `ShapeInput` communicated. https://gitlab.gnome.org/GNOME/mutter/-/issues/2788 Part-of: --- src/wayland/meta-wayland-actor-surface.c | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/wayland/meta-wayland-actor-surface.c b/src/wayland/meta-wayland-actor-surface.c index 1b6b1bf00..eb81d9e5f 100644 --- a/src/wayland/meta-wayland-actor-surface.c +++ b/src/wayland/meta-wayland-actor-surface.c @@ -214,24 +214,24 @@ meta_wayland_actor_surface_real_sync_actor_state (MetaWaylandActorSurface *actor .height = meta_wayland_surface_get_height (surface), }; - if (surface->input_region) - { - cairo_region_t *input_region; - - input_region = cairo_region_copy (surface->input_region); - cairo_region_intersect_rectangle (input_region, &surface_rect); - meta_surface_actor_set_input_region (surface_actor, input_region); - cairo_region_destroy (input_region); - } - else - { - meta_surface_actor_set_input_region (surface_actor, NULL); - } - #ifdef HAVE_XWAYLAND if (!META_IS_XWAYLAND_SURFACE (surface_role)) #endif { + if (surface->input_region) + { + cairo_region_t *input_region; + + input_region = cairo_region_copy (surface->input_region); + cairo_region_intersect_rectangle (input_region, &surface_rect); + meta_surface_actor_set_input_region (surface_actor, input_region); + cairo_region_destroy (input_region); + } + else + { + meta_surface_actor_set_input_region (surface_actor, NULL); + } + if (!meta_shaped_texture_has_alpha (stex)) { cairo_region_t *opaque_region;