[mutter/wip/carlosg/async-xwayland-startup: 6/6] compositor: Shuffle x11 compositing bits in MetaCompositor



commit f6663aced6a0b4c72f3d0553c68b190624e63f94
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Feb 28 18:59:39 2020 +0100

    compositor: Shuffle x11 compositing bits in MetaCompositor
    
    Given that on Wayland we are pretty much guaranteed to finish MetaX11Display
    setup after the MetaCompositor is enabled, we may drop the
    meta_compositor_manage() x11 initialization bits, and move them into the
    MetaX11Compositor subclass where it's actually needed.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/944

 src/compositor/compositor.c          | 5 -----
 src/compositor/meta-compositor-x11.c | 4 ++++
 2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index 8315ca56e..f19f03be9 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -558,9 +558,6 @@ meta_compositor_manage (MetaCompositor *compositor)
   MetaDisplay *display = priv->display;
   MetaBackend *backend = meta_get_backend ();
 
-  if (display->x11_display)
-    meta_x11_display_set_cm_selection (display->x11_display);
-
   priv->stage = meta_backend_get_stage (backend);
 
   priv->stage_presented_id =
@@ -592,8 +589,6 @@ meta_compositor_manage (MetaCompositor *compositor)
 
   META_COMPOSITOR_GET_CLASS (compositor)->manage (compositor);
 
-  meta_compositor_redirect_x11_windows (compositor);
-
   priv->plugin_mgr = meta_plugin_manager_new (compositor);
 }
 
diff --git a/src/compositor/meta-compositor-x11.c b/src/compositor/meta-compositor-x11.c
index fce3f830c..1737e97f5 100644
--- a/src/compositor/meta-compositor-x11.c
+++ b/src/compositor/meta-compositor-x11.c
@@ -109,6 +109,8 @@ meta_compositor_x11_manage (MetaCompositor *compositor)
   MetaBackend *backend = meta_get_backend ();
   Window xwindow;
 
+  meta_x11_display_set_cm_selection (display->x11_display);
+
   compositor_x11->output = display->x11_display->composite_overlay_window;
 
   xwindow = meta_backend_x11_get_xwindow (META_BACKEND_X11 (backend));
@@ -135,6 +137,8 @@ meta_compositor_x11_manage (MetaCompositor *compositor)
   XMapWindow (xdisplay, compositor_x11->output);
 
   compositor_x11->have_x11_sync_object = meta_sync_ring_init (xdisplay);
+
+  meta_compositor_redirect_x11_windows (META_COMPOSITOR (compositor));
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]