Commit 44905d96 authored by Jonas Ådahl's avatar Jonas Ådahl Committed by Georges Basile Stavracas Neto

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).

GNOME/mutter#548
GNOME/mutter!525
parent 73e8127d
......@@ -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 *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment