summaryrefslogtreecommitdiff
path: root/tests/src/X.c
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2013-06-26 14:36:43 +1200
committerRobert Ancell <robert.ancell@canonical.com>2013-06-26 14:36:43 +1200
commit1666050c96987b674a66a9ea4bdfc704532879c5 (patch)
tree3d91f90466bf4c3585fafadfd6ead18b069b60d0 /tests/src/X.c
parent66321294e7dfd5907b757dfdd41e9c91afa4f72c (diff)
parent24be578f0b29a85ec522511baf8829c8e741e7a7 (diff)
downloadlightdm-git-1666050c96987b674a66a9ea4bdfc704532879c5.tar.gz
Merge with trunk
Diffstat (limited to 'tests/src/X.c')
-rw-r--r--tests/src/X.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/src/X.c b/tests/src/X.c
index 1240f7b0..66574238 100644
--- a/tests/src/X.c
+++ b/tests/src/X.c
@@ -27,6 +27,9 @@ static gchar *auth_path = NULL;
/* Display number being served */
static int display_number = 0;
+/* VT being run on */
+static int vt_number = -1;
+
/* X server */
static XServer *xserver = NULL;
@@ -198,6 +201,7 @@ main (int argc, char **argv)
gchar *mir_id = NULL;
gchar *lock_filename;
int lock_file;
+ GString *status_text;
signal (SIGINT, signal_cb);
signal (SIGTERM, signal_cb);
@@ -258,7 +262,7 @@ main (int argc, char **argv)
}
else if (g_str_has_prefix (arg, "vt"))
{
- /* Ignore VT args */
+ vt_number = atoi (arg + 2);
}
else if (strcmp (arg, "-novtswitch") == 0)
{
@@ -297,10 +301,14 @@ main (int argc, char **argv)
g_signal_connect (xserver, "client-connected", G_CALLBACK (client_connected_cb), NULL);
g_signal_connect (xserver, "client-disconnected", G_CALLBACK (client_disconnected_cb), NULL);
+ status_text = g_string_new ("");
+ g_string_printf (status_text, "XSERVER-%d START", display_number);
+ if (vt_number >= 0)
+ g_string_append_printf (status_text, " VT=%d", vt_number);
if (mir_id != NULL)
- status_notify ("XSERVER-%d START MIR-ID=%s", display_number, mir_id);
- else
- status_notify ("XSERVER-%d START", display_number);
+ g_string_append_printf (status_text, " MIR-ID=%s", mir_id);
+ status_notify (status_text->str);
+ g_string_free (status_text, TRUE);
config = g_key_file_new ();
g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL);