Control: tags -1 + confirmed patch

Le mercredi 29 mai 2013 à 18:55 +0530, shirish शिरीष a écrit :

> I have been having the same issue as Salvatore Bonaccorso even though
> mine is gdm:3.6.1-2 version and not gdm3.4.1-8 .

I confirm the bug in both wheezy and sid (with disable_user_list=true).

Here is an analysis of the bug:

- when the user clicks "Cancel", a D-Bus signal is emitted, which leads
to the function gdm_greeter_login_window_reset() being called

- this latter function calls reset_dialog_after_messages(), and then
restarts all extensions

- the problem is that there are pending messages, which will be
processed before calling reset_dialog(); therefore the reset_dialog()
function is actually called *after* the extensions have been restarted

- since the reset_dialog() calls reset_extension() on all extensions,
those are left in a disabled state, and the authentication does not
start

I attach a patch that solves the problem in a minimalistic way, with no
risk of breaking anything else. Maybe there is a better way of solving
the problem by refactoring the logic, but I could not figure it.

Joss: can you please review the patch? If you agree with it, I would
like to fix the bug in wheezy (which means first fixing it in sid).

> "But the problem does not seem only present when disabling the user
> listing. Even with disable_user_list=false, after cancelling a login,
> the greeter gets confused and it's not possible anymore to scroll the
> user list shown." - Salvatore Bonaccorso

When disable_user_list=false, there is indeed also a problem, but this
is a different issue. It only affects sid (not wheezy), and I guess it
is related to GTK+ 3.8.

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

--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -147,6 +147,8 @@
         guint            start_session_handler_id;
 
         char            *service_name_of_session_ready_to_start;
+
+        gboolean         restart_extension_conversations_on_selection_mode;
 };
 
 enum {
@@ -190,6 +192,9 @@
 static void     begin_single_service_verification (GdmGreeterLoginWindow *login_window,
                                                    const char            *service_name);
 
+static gboolean restart_extension_conversation (GdmLoginExtension     *extension,
+                                                GdmGreeterLoginWindow *login_window);
+
 G_DEFINE_TYPE (GdmGreeterLoginWindow, gdm_greeter_login_window, GTK_TYPE_WINDOW)
 
 static void
@@ -863,6 +868,14 @@
 
         g_list_foreach (login_window->priv->extensions, (GFunc) reset_extension, login_window);
 
+        if (login_window->priv->restart_extension_conversations_on_selection_mode)
+                {
+                        g_list_foreach (login_window->priv->extensions,
+                                        (GFunc) restart_extension_conversation,
+                                        login_window);
+                        login_window->priv->restart_extension_conversations_on_selection_mode = FALSE;
+                }
+
         if (can_jump_to_authenticate (login_window)) {
                 /* If we don't have a user list jump straight to authenticate */
                 g_debug ("GdmGreeterLoginWindow: jumping straight to authenticate");
@@ -1086,9 +1099,7 @@
         g_return_val_if_fail (GDM_IS_GREETER_LOGIN_WINDOW (login_window), FALSE);
 
         reset_dialog_after_messages (login_window, MODE_SELECTION);
-        g_list_foreach (login_window->priv->extensions,
-                        (GFunc) restart_extension_conversation,
-                        login_window);
+        login_window->priv->restart_extension_conversations_on_selection_mode = TRUE;
 
         g_free (login_window->priv->service_name_of_session_ready_to_start);
         login_window->priv->service_name_of_session_ready_to_start = NULL;
@@ -2556,6 +2567,7 @@
         login_window->priv->timed_login_enabled = FALSE;
         login_window->priv->dialog_mode = MODE_UNDEFINED;
         login_window->priv->next_mode = MODE_UNDEFINED;
+        login_window->priv->restart_extension_conversations_on_selection_mode = FALSE;
 
         settings = g_settings_new (LOGIN_SCREEN_SCHEMA);
 

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

Reply via email to