wayland: Use wl_display_add_socket_auto

This commit is contained in:
Jasper St. Pierre 2014-08-05 16:10:17 -04:00
parent 97f4eb6b75
commit 2ce23072d3
2 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ typedef struct
struct _MetaWaylandCompositor struct _MetaWaylandCompositor
{ {
struct wl_display *wayland_display; struct wl_display *wayland_display;
char *display_name; const char *display_name;
ClutterActor *stage; ClutterActor *stage;
GHashTable *outputs; GHashTable *outputs;
struct wl_list frame_callbacks; struct wl_list frame_callbacks;

View File

@ -417,8 +417,8 @@ meta_wayland_init (void)
meta_wayland_seat_init (compositor); meta_wayland_seat_init (compositor);
/* FIXME: find the first free name instead */ /* FIXME: find the first free name instead */
compositor->display_name = g_strdup ("wayland-0"); compositor->display_name = wl_display_add_socket_auto (compositor->wayland_display);
if (wl_display_add_socket (compositor->wayland_display, compositor->display_name)) if (compositor->display_name == NULL)
g_error ("Failed to create socket"); g_error ("Failed to create socket");
/* XXX: It's important that we only try and start xwayland after we /* XXX: It's important that we only try and start xwayland after we