~townsend/lightdm/fix-plymouthd-spin

« back to all changes in this revision

Viewing changes to tests/src/X.c

  • Committer: Robert Ancell
  • Date: 2013-06-26 02:36:43 UTC
  • mfrom: (1576.1.116 trunk)
  • Revision ID: robert.ancell@canonical.com-20130626023643-laukx9g933wi4i3e
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
/* Display number being served */
28
28
static int display_number = 0;
29
29
 
 
30
/* VT being run on */
 
31
static int vt_number = -1;
 
32
 
30
33
/* X server */
31
34
static XServer *xserver = NULL;
32
35
 
198
201
    gchar *mir_id = NULL;
199
202
    gchar *lock_filename;
200
203
    int lock_file;
 
204
    GString *status_text;
201
205
 
202
206
    signal (SIGINT, signal_cb);
203
207
    signal (SIGTERM, signal_cb);
258
262
        }
259
263
        else if (g_str_has_prefix (arg, "vt"))
260
264
        {
261
 
            /* Ignore VT args */
 
265
            vt_number = atoi (arg + 2);
262
266
        }
263
267
        else if (strcmp (arg, "-novtswitch") == 0)
264
268
        {
297
301
    g_signal_connect (xserver, "client-connected", G_CALLBACK (client_connected_cb), NULL);
298
302
    g_signal_connect (xserver, "client-disconnected", G_CALLBACK (client_disconnected_cb), NULL);
299
303
 
 
304
    status_text = g_string_new ("");
 
305
    g_string_printf (status_text, "XSERVER-%d START", display_number);
 
306
    if (vt_number >= 0)
 
307
        g_string_append_printf (status_text, " VT=%d", vt_number);
300
308
    if (mir_id != NULL)
301
 
        status_notify ("XSERVER-%d START MIR-ID=%s", display_number, mir_id);
302
 
    else
303
 
        status_notify ("XSERVER-%d START", display_number);
 
309
        g_string_append_printf (status_text, " MIR-ID=%s", mir_id);
 
310
    status_notify (status_text->str);
 
311
    g_string_free (status_text, TRUE);
304
312
 
305
313
    config = g_key_file_new ();
306
314
    g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL);