main: Initialize Wayland just before MetaDisplay

Wayland support is not really a "backend" thing, it just lacked a better
place to store its instance pointer. Eventually we'll have a better
place, but prepare for that by initializing it together with the more
similar subsystems.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1833>
This commit is contained in:
Jonas Ådahl 2021-02-25 17:40:45 +01:00 committed by Marge Bot
parent 270f1cf7a5
commit c9992a2953
3 changed files with 5 additions and 8 deletions

View File

@ -234,10 +234,6 @@ meta_backend_native_post_init (MetaBackend *backend)
#endif #endif
update_viewports (backend); update_viewports (backend);
#ifdef HAVE_WAYLAND
meta_backend_init_wayland (backend);
#endif
} }
static MetaMonitorManager * static MetaMonitorManager *

View File

@ -243,10 +243,6 @@ meta_backend_x11_nested_post_init (MetaBackend *backend)
META_BACKEND_CLASS (meta_backend_x11_nested_parent_class); META_BACKEND_CLASS (meta_backend_x11_nested_parent_class);
backend_class->post_init (backend); backend_class->post_init (backend);
#ifdef HAVE_WAYLAND
meta_backend_init_wayland (backend);
#endif
} }
static gboolean static gboolean

View File

@ -852,6 +852,11 @@ meta_start (void)
{ {
meta_prefs_init (); meta_prefs_init ();
#ifdef HAVE_WAYLAND
if (meta_is_wayland_compositor ())
meta_backend_init_wayland (meta_get_backend ());
#endif
if (!meta_display_open ()) if (!meta_display_open ())
meta_exit (META_EXIT_ERROR); meta_exit (META_EXIT_ERROR);
} }