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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3022>
This commit is contained in:
Jonas Ådahl 2023-05-25 12:50:51 +02:00 committed by Marge Bot
parent e829862249
commit cef1a5d377

View File

@ -214,6 +214,10 @@ meta_wayland_actor_surface_real_sync_actor_state (MetaWaylandActorSurface *actor
.height = meta_wayland_surface_get_height (surface),
};
#ifdef HAVE_XWAYLAND
if (!META_IS_XWAYLAND_SURFACE (surface_role))
#endif
{
if (surface->input_region)
{
cairo_region_t *input_region;
@ -228,10 +232,6 @@ meta_wayland_actor_surface_real_sync_actor_state (MetaWaylandActorSurface *actor
meta_surface_actor_set_input_region (surface_actor, NULL);
}
#ifdef HAVE_XWAYLAND
if (!META_IS_XWAYLAND_SURFACE (surface_role))
#endif
{
if (!meta_shaped_texture_has_alpha (stex))
{
cairo_region_t *opaque_region;