]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Release the VT when the system compositor fails to start.
authorRobert Ancell <robert.ancell@canonical.com>
Tue, 16 Jul 2013 22:06:06 +0000 (10:06 +1200)
committerRobert Ancell <robert.ancell@canonical.com>
Tue, 16 Jul 2013 22:06:06 +0000 (10:06 +1200)
src/seat-unity.c
tests/scripts/unity-autologin.conf
tests/scripts/unity-compositor-command.conf
tests/scripts/unity-compositor-fail-ready.conf
tests/scripts/unity-compositor-fail-start.conf
tests/scripts/unity-login.conf
tests/scripts/unity-switch.conf
tests/src/unity-system-compositor.c

index 6f4b15e092cc470b11e6d9b466a168c5a24e4f49..d065cbed476bc9422a048954642e823b281f6b2b 100644 (file)
@@ -90,6 +90,10 @@ compositor_stopped_cb (Process *process, SeatUnity *seat)
         g_source_remove (seat->priv->compositor_timeout);
     seat->priv->compositor_timeout = 0;
 
+    /* Finished with the VT */
+    vt_unref (seat->priv->vt);
+    seat->priv->vt = -1;
+
     if (seat_get_is_stopping (SEAT (seat)))
     {
         SEAT_CLASS (seat_unity_parent_class)->stop (SEAT (seat));
index 481e3623945e77c9961a9fe40541fe2a87afd06f..39c19b333d693b64b8f7393abc1b15109b2802c1 100644 (file)
@@ -10,7 +10,7 @@ user-session=default
 #?RUNNER DAEMON-START
 
 # System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START
+#?UNITY-SYSTEM-COMPOSITOR START VT=7
 #?*UNITY-SYSTEM-COMPOSITOR READY
 
 # X server starts
index a768993b97b44c88a384957829715a462a7caedd..716461b6adc6a9f506547c4cd827bda8e85bfe41 100644 (file)
@@ -10,7 +10,7 @@ unity-compositor-command=unity-system-compositor --test
 #?RUNNER DAEMON-START
 
 # System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START TEST
+#?UNITY-SYSTEM-COMPOSITOR START VT=7 TEST=TRUE
 #?*UNITY-SYSTEM-COMPOSITOR READY
 
 # X server starts
index bad936e002a1b188e99eb4f1e0f30cb03a5efc9d..5c12fc8a3a95f1c32a20e20160f1fead1d12b47a 100644 (file)
@@ -9,13 +9,13 @@ unity-compositor-timeout=1
 #?RUNNER DAEMON-START
 
 # System compositor starts but doesn't indicate it is ready
-#?UNITY-SYSTEM-COMPOSITOR START
+#?UNITY-SYSTEM-COMPOSITOR START VT=7
 
 # Timeout and compositor is stopped
 #?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
 
 # X server starts in VT mode
-#?XSERVER-0 START VT=8
+#?XSERVER-0 START VT=7
 #?XSERVER-0 INDICATE-READY
 
 # LightDM connects to X server
index 258b7f4f2a7a6ce163424788d3cc4b2cecd86b32..a9e955452c9bfb2cfff1b85adeef3b8dafc06ec8 100644 (file)
@@ -11,11 +11,11 @@ type=unity
 #?RUNNER DAEMON-START
 
 # System compositor fails to start
-#?UNITY-SYSTEM-COMPOSITOR START
+#?UNITY-SYSTEM-COMPOSITOR START VT=7
 #?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
 
 # X server starts in VT mode
-#?XSERVER-0 START VT=8
+#?XSERVER-0 START VT=7
 #?XSERVER-0 INDICATE-READY
 
 # LightDM connects to X server
index 4750c233f62bcbacba37ef04db8defae902d8614..e9af08af54128d3f0783d7a5f4aa262c8bcfa1cc 100644 (file)
@@ -9,7 +9,7 @@ user-session=default
 #?RUNNER DAEMON-START
 
 # System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START
+#?UNITY-SYSTEM-COMPOSITOR START VT=7
 #?*UNITY-SYSTEM-COMPOSITOR READY
 
 # X server starts
index 939738c88cf3e240b0f10dba3fcce75aa5d98419..c4b0e5f8209a8e0065b02ce1a4dfe71f943931ba 100644 (file)
@@ -10,7 +10,7 @@ user-session=default
 #?RUNNER DAEMON-START
 
 # System compositor starts
-#?UNITY-SYSTEM-COMPOSITOR START
+#?UNITY-SYSTEM-COMPOSITOR START VT=7
 #?*UNITY-SYSTEM-COMPOSITOR READY
 
 # X server starts
index 2dcf8c128aaad5e57dcb689a72ea34b79fb7a794..a03f772f05646a99adbf7e35693fda797ff507d5 100644 (file)
@@ -123,7 +123,9 @@ int
 main (int argc, char **argv)
 {
     int i;
+    GString *status_text;
     gboolean test = FALSE;
+    int vt_number = -1;
 
     signal (SIGINT, signal_cb);
     signal (SIGTERM, signal_cb);
@@ -153,7 +155,7 @@ main (int argc, char **argv)
         }
         else if (strcmp (arg, "--vt") == 0)
         {
-            //vt_number = atoi (argv[i+1]);
+            vt_number = atoi (argv[i+1]);
             i++;
         }
         else if (strcmp (arg, "--test") == 0)
@@ -164,10 +166,13 @@ main (int argc, char **argv)
 
     g_io_add_watch (g_io_channel_unix_new (from_dm_fd), G_IO_IN, read_message_cb, NULL);
 
+    status_text = g_string_new ("UNITY-SYSTEM-COMPOSITOR START");
+    if (vt_number >= 0)
+        g_string_append_printf (status_text, " VT=%d", vt_number);
     if (test)
-        status_notify ("UNITY-SYSTEM-COMPOSITOR START TEST");
-    else
-        status_notify ("UNITY-SYSTEM-COMPOSITOR START");
+        g_string_append (status_text, " TEST=TRUE");
+    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);