~robert-ancell/lightdm/weston-compositor-merge

« back to all changes in this revision

Viewing changes to src/xserver-local.c

  • Committer: Robert Ancell
  • Date: 2012-07-05 04:55:42 UTC
  • Revision ID: robert.ancell@canonical.com-20120705045542-dd1dopowti68gtwm
First work on supporting a weston system compositor

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
    /* XDMCP key to use */
55
55
    gchar *xdmcp_key;
56
56
 
 
57
    /* Socket to communicate with Wayland compositor */
 
58
    gint wayland_socket_fd;
 
59
 
57
60
    /* TRUE when received ready signal */
58
61
    gboolean got_signal;
59
62
 
221
224
    server->priv->xdmcp_key = g_strdup (key);
222
225
}
223
226
 
 
227
void
 
228
xserver_local_set_wayland_socket (XServerLocal *server, gint fd)
 
229
{
 
230
    g_return_if_fail (server != NULL);
 
231
    server->priv->wayland_socket_fd = fd;
 
232
}
 
233
 
224
234
gint
225
235
xserver_local_get_vt (XServerLocal *server)
226
236
{
451
461
        g_free (path);
452
462
    }
453
463
 
 
464
    /* Setup for running inside a Wayland compositor */
 
465
    if (server->priv->wayland_socket_fd != 0)
 
466
    {
 
467
        gchar *value = g_strdup_printf ("%d\n", server->priv->wayland_socket_fd);
 
468
        process_set_env (server->priv->xserver_process, "WAYLAND_SOCKET", value);
 
469
        g_free (value);
 
470
        g_string_append (command, " -wayland");
 
471
    }
 
472
 
454
473
    /* Connect to a remote server using XDMCP */
455
474
    if (server->priv->xdmcp_server != NULL)
456
475
    {