launcher: Expose KMS fd

https://bugzilla.gnome.org/show_bug.cgi?id=768976
This commit is contained in:
Jonas Ådahl 2016-05-07 17:45:07 +08:00
parent e05f48fc53
commit f096cc327d
2 changed files with 11 additions and 0 deletions

View File

@ -56,6 +56,8 @@ struct _MetaLauncher
Login1Seat *seat_proxy; Login1Seat *seat_proxy;
gboolean session_active; gboolean session_active;
int kms_fd;
}; };
static Login1Session * static Login1Session *
@ -461,6 +463,7 @@ meta_launcher_new (GError **error)
self->seat_proxy = g_object_ref (seat_proxy); self->seat_proxy = g_object_ref (seat_proxy);
self->session_active = TRUE; self->session_active = TRUE;
self->kms_fd = kms_fd;
clutter_egl_set_kms_fd (kms_fd); clutter_egl_set_kms_fd (kms_fd);
clutter_evdev_set_device_callbacks (on_evdev_device_open, clutter_evdev_set_device_callbacks (on_evdev_device_open,
@ -502,3 +505,9 @@ meta_launcher_activate_vt (MetaLauncher *launcher,
{ {
return login1_seat_call_switch_to_sync (launcher->seat_proxy, vt, NULL, error); return login1_seat_call_switch_to_sync (launcher->seat_proxy, vt, NULL, error);
} }
int
meta_launcher_get_kms_fd (MetaLauncher *self)
{
return self->kms_fd;
}

View File

@ -34,4 +34,6 @@ gboolean meta_launcher_activate_vt (MetaLauncher *self,
signed char vt, signed char vt,
GError **error); GError **error);
int meta_launcher_get_kms_fd (MetaLauncher *self);
#endif /* META_LAUNCHER_H */ #endif /* META_LAUNCHER_H */