← Back to team overview

ubuntu-multiseat team mailing list archive

[Merge] lp:~ubuntu-multiseat/lightdm/fix-get-vt-non-seat0 into lp:lightdm

 

Laércio de Sousa has proposed merging lp:~ubuntu-multiseat/lightdm/fix-get-vt-non-seat0 into lp:lightdm.

Requested reviews:
  LightDM Development Team (lightdm-team)

For more details, see:
https://code.launchpad.net/~ubuntu-multiseat/lightdm/fix-get-vt-non-seat0/+merge/230972

Make get_vt() return -1 immediately if "xdg-seat" property value is not "seat0".

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 in this case.
-- 
https://code.launchpad.net/~ubuntu-multiseat/lightdm/fix-get-vt-non-seat0/+merge/230972
Your team Ubuntu Multiseat is subscribed to branch lp:~ubuntu-multiseat/lightdm/fix-get-vt-non-seat0.
=== modified file 'src/seat-xlocal.c'
--- src/seat-xlocal.c	2014-07-31 04:59:55 +0000
+++ src/seat-xlocal.c	2014-08-15 13:13:25 +0000
@@ -61,7 +61,11 @@
 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 @@
     }
     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;


Follow ups