x11/x11-display: Set compositor selection earlier on XWayland

When the X11 display is actually XWayland there's no point to delay the
compositor selection, given that mutter itself is the compositor and
doing this may cause the first X11 client that starts not to receive the
right information (and in some cases misbehave).

Since some toolkits are not handling the compositor selection changes
properly at later times, let's make their life easier by just
initializing the selection as early as the other X11 properties, given
that in this case there's nothing to replace.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2472
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2970>
This commit is contained in:
Marco Trevisan (Treviño)
2023-04-18 22:07:37 +02:00
parent 05dd401b64
commit 2625edec10
4 changed files with 28 additions and 6 deletions

View File

@@ -762,7 +762,6 @@ meta_display_init_x11_finish (MetaDisplay *display,
if (!display->display_opening)
{
g_signal_emit (display, display_signals[X11_DISPLAY_OPENED], 0);
meta_x11_display_set_cm_selection (x11_display);
meta_display_manage_all_xwindows (display);
meta_compositor_redirect_x11_windows (display->compositor);
}