x11: Bypass GTK on XFixesSelectionNotify

In GTK this is only used for GTK clipboard/DnD selections, and
finding out whether there is a compositing manager in charge.
In Mutter, we manage our own clipboard/DnD selections, and don't
perform any rendering through GTK in the Mutter process.

So there's no special reason to let these events go through GTK,
and (related to xwayland-on-demand?) there may be race conditions
in the handling of the second feature.

There's a chance this race condition may be in Mutter, but it
does not sound worth to chase this race condition when we can
let GTK ignore these events. And it does not make sense to "fix"
gtk3 for this Mutter-only condition, when we intend to eventually
avoid it.

So, take the easy path and ignore these events.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2617
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2831>
This commit is contained in:
Carlos Garnacho 2023-02-07 22:03:07 +01:00 committed by Marge Bot
parent 523b27e267
commit b321d545b1

View File

@ -1815,6 +1815,11 @@ handle_other_xevent (MetaX11Display *x11_display,
break;
}
}
else if (event->type == (x11_display->xfixes_event_base + XFixesSelectionNotify))
{
bypass_gtk = TRUE; /* GTK doesn't want to see this really */
}
break;
}