Control: tags -1 + patch

First, I verified that the bug is not present in vanilla GDM3. It is
introduced by the patches about transient displays and switch_on_finish
property.

More precisely, the problem is introduced by
21_static_display_purge.patch. In the "finish" method of
GdmStaticDisplay, this patch adds a call to the "finish" method of the
parent. The latter parent method changes the status of the display to
the FINISHED state, which in turn triggers a reset of the number of
failures and spawns a new display. The problem is that the FINISHED
state is reached before the FAILED state.

I could verify that the attached patch fixes the problem. And it is
rather clear that the patch does not affect the behavior when the X
server does not fail.

joss: Are you ok with this patch? Moreover, do you think it should be
added as a separate quilt patch, or merged into
21_static_display_purge.patch?

-- 
 .''`.    Sébastien Villemot
: :' :    Debian Developer
`. `'     http://www.dynare.org/sebastien
  `-      GPG Key: 4096R/381A7594

--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -326,10 +326,8 @@
                    so that it may be reused */
                 g_hash_table_remove (factory->priv->displays, GUINT_TO_POINTER (num));
                 gdm_display_store_remove (store, display);
-                /* reset num failures */
-                factory->priv->num_failures = 0;
 
-                if (switch_on_finish) {
+                if (switch_on_finish && factory->priv->num_failures <= MAX_DISPLAY_FAILURES) {
                 	switch_to_login_session (factory);
                  }
                 break;
@@ -348,6 +346,8 @@
                 }
                 break;
         case GDM_DISPLAY_UNMANAGED:
+                /* reset num failures */
+                factory->priv->num_failures = 0;
                 break;
         case GDM_DISPLAY_PREPARED:
                 break;

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to