]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blobdiff - src/seat-xlocal.c
Only seat0 takes VT from Plymouth
[sojka/lightdm.git] / src / seat-xlocal.c
index 73cc1217b6ba8ac07e8b6b2770854ec795d3e1ee..c9dd8cf4950437053649c138baa9fe564aa7ecdc 100644 (file)
@@ -61,7 +61,9 @@ static gint
 get_vt (Seat *seat, DisplayServer *display_server)
 {
     gint vt = -1;
-    const gchar *xdg_seat = seat_get_string_property (seat, "xdg-seat");
+    const gchar *xdg_seat = seat_get_name (seat);
+    if (strcmp (xdg_seat, "seat0") != 0)
+        return vt;
 
     /* If Plymouth is running, stop it */
     if (plymouth_get_is_active () && plymouth_has_active_vt ())
@@ -79,9 +81,7 @@ get_vt (Seat *seat, DisplayServer *display_server)
     }
     if (plymouth_get_is_active ())
         plymouth_quit (FALSE);
-    if (!xdg_seat)
-        xdg_seat = "seat0";
-    if (vt < 0 && g_strcmp0 (xdg_seat, "seat0") == 0)
+    if (vt < 0)
         vt = vt_get_unused ();
 
     return vt;