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
This commit is contained in:
parent
73e8127d5d
commit
44905d96da
@ -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 *
|
||||
|
Loading…
Reference in New Issue
Block a user