From 44905d96daa7872c3d91b0780e71421142856d3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 10 Jan 2019 11:54:07 +0100 Subject: [PATCH] backends/native: Move some initialization from init() to initable_init() This means we can report the errors properly, instead of logging a warning and calling exit(1). https://gitlab.gnome.org/GNOME/mutter/issues/548 https://gitlab.gnome.org/GNOME/mutter/merge_requests/525 --- src/backends/native/meta-backend-native.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c index 50eb7bfc6..30a5d9906 100644 --- a/src/backends/native/meta-backend-native.c +++ b/src/backends/native/meta-backend-native.c @@ -527,7 +527,12 @@ meta_backend_native_initable_init (GInitable *initable, return FALSE; } + native->launcher = meta_launcher_new (error); + if (!native->launcher) + return FALSE; + native->udev = meta_udev_new (); + native->barrier_manager = meta_barrier_manager_native_new (); return initable_parent_iface->init (initable, cancellable, error); } @@ -573,16 +578,6 @@ meta_backend_native_class_init (MetaBackendNativeClass *klass) static void meta_backend_native_init (MetaBackendNative *native) { - GError *error = NULL; - - native->launcher = meta_launcher_new (&error); - if (native->launcher == NULL) - { - g_warning ("Can't initialize KMS backend: %s\n", error->message); - exit (1); - } - - native->barrier_manager = meta_barrier_manager_native_new (); } MetaLauncher *