]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Make get_vt() return -1 immediately if "xdg-seat" property value is not "seat0".
authorLaércio de Sousa <lbsousajr@gmail.com>
Fri, 15 Aug 2014 12:46:54 +0000 (09:46 -0300)
committerLaércio de Sousa <lbsousajr@gmail.com>
Fri, 15 Aug 2014 12:46:54 +0000 (09:46 -0300)
Since release 1.16, Xorg-server no longer touches VTs if -seat option
with a non-seat0 value is passed, so there's no need to return a non-negative
value in get_vt() for non-seat0 seats.

src/seat-xlocal.c

index 73cc1217b6ba8ac07e8b6b2770854ec795d3e1ee..d4254e523b8e993e5d0a9a91fe40d97de7540b93 100644 (file)
@@ -61,7 +61,11 @@ 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 (!xdg_seat)
+        xdg_seat = "seat0";
+    if (g_strcmp0 (xdg_seat, "seat0") != 0)
+        return vt;
 
     /* If Plymouth is running, stop it */
     if (plymouth_get_is_active () && plymouth_has_active_vt ())
@@ -79,9 +83,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;