diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c index 399560f1e..98d6c1a57 100644 --- a/src/backends/native/meta-backend-native.c +++ b/src/backends/native/meta-backend-native.c @@ -234,10 +234,6 @@ meta_backend_native_post_init (MetaBackend *backend) #endif update_viewports (backend); - -#ifdef HAVE_WAYLAND - meta_backend_init_wayland (backend); -#endif } static MetaMonitorManager * diff --git a/src/backends/x11/nested/meta-backend-x11-nested.c b/src/backends/x11/nested/meta-backend-x11-nested.c index dd9f31858..bf6296dbf 100644 --- a/src/backends/x11/nested/meta-backend-x11-nested.c +++ b/src/backends/x11/nested/meta-backend-x11-nested.c @@ -243,10 +243,6 @@ meta_backend_x11_nested_post_init (MetaBackend *backend) META_BACKEND_CLASS (meta_backend_x11_nested_parent_class); backend_class->post_init (backend); - -#ifdef HAVE_WAYLAND - meta_backend_init_wayland (backend); -#endif } static gboolean diff --git a/src/core/main.c b/src/core/main.c index dae1b4e53..76d3ef5df 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -852,6 +852,11 @@ meta_start (void) { meta_prefs_init (); +#ifdef HAVE_WAYLAND + if (meta_is_wayland_compositor ()) + meta_backend_init_wayland (meta_get_backend ()); +#endif + if (!meta_display_open ()) meta_exit (META_EXIT_ERROR); }