sobota, 25 maja 2013

lightdm 1.6.0-3

OK, the patches almost apply; below there is the new patch.
Confirmed, works.

Description: <short summary of the patch>
 Xephyr-multiseat requires that all X servers are run on the same vt.
 .
 lightdm (1.6.0-3) unstable; urgency=low
 .
   * debian/control:
     - drop valac-0.18 dependency for now since it's not available in sid
       anyway.                                                   closes: #707176
Author: Yves-Alexis Perez <corsac@debian.org>
Bug-Debian: http://bugs.debian.org/707176

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- lightdm-1.6.0.orig/src/lightdm.c
+++ lightdm-1.6.0/src/lightdm.c
@@ -974,6 +974,8 @@ main (int argc, char **argv)
         config_set_boolean (config_get_instance (), "LightDM", "start-default-seat", TRUE);
     if (!config_has_key (config_get_instance (), "LightDM", "minimum-vt"))
         config_set_integer (config_get_instance (), "LightDM", "minimum-vt", 7);
+    if (!config_has_key (config_get_instance (), "LightDM", "common-vt"))
+        config_set_boolean (config_get_instance (), "LightDM", "common-vt", FALSE);
     if (!config_has_key (config_get_instance (), "LightDM", "guest-account-script"))
         config_set_string (config_get_instance (), "LightDM", "guest-account-script", "guest-account");
     if (!config_has_key (config_get_instance (), "LightDM", "greeter-user"))
--- lightdm-1.6.0.orig/src/xserver-local.c
+++ lightdm-1.6.0/src/xserver-local.c
@@ -318,9 +318,13 @@ got_signal_cb (Process *process, int sig
 static void
 stopped_cb (Process *process, XServerLocal *server)
 {
+    guint display_number;
+    gchar *path;
+
     g_debug ("X server stopped");

-    xserver_local_release_display_number (xserver_get_display_number (XSERVER (server)));
+    display_number = xserver_get_display_number (XSERVER (server));
+    xserver_local_release_display_number (display_number);
  
     if (xserver_get_authority (XSERVER (server)) && server->priv->authority_file)
     {
@@ -345,6 +349,10 @@ stopped_cb (Process *process, XServerLoc
         plymouth_quit (FALSE);
     }

+    path = g_strdup_printf ("/tmp/.X%d-lock", display_number);
+    g_unlink (path);
+    g_free (path);
+
     DISPLAY_SERVER_CLASS (xserver_local_parent_class)->stop (DISPLAY_SERVER (server));
 }

--- lightdm-1.6.0.orig/src/vt.c
+++ lightdm-1.6.0/src/vt.c
@@ -125,15 +125,23 @@ vt_get_min (void)
 gint
 vt_get_unused (void)
 {
+    static gint common_number = -1;
+
+    gboolean common_vt;
     gint number;

     if (getuid () != 0)
         return -1;

+    common_vt = config_get_boolean (config_get_instance (), "LightDM", "common-vt");
+    if (common_vt && common_number > 0)
+    return common_number;
+
     number = vt_get_min ();
     while (vt_is_used (number))
         number++;
 
+    common_number = number;
     return number;
 }

Brak komentarzy:

Prześlij komentarz