Commit ff98b281 authored by Ray Strode's avatar Ray Strode

manager: if falling back to X11 retry autologin

Right now, we get one shot to autologin. If it fails, we fall back to
the greeter.  We should give it another go if the reason for the failure
was wayland fallback to X.

https://bugzilla.gnome.org/show_bug.cgi?id=780520
parent 9de6b000
...@@ -1446,8 +1446,6 @@ greeter_display_started (GdmManager *manager, ...@@ -1446,8 +1446,6 @@ greeter_display_started (GdmManager *manager,
} }
maybe_start_pending_initial_login (manager, display); maybe_start_pending_initial_login (manager, display);
manager->priv->ran_once = TRUE;
} }
static void static void
...@@ -1457,6 +1455,7 @@ on_display_status_changed (GdmDisplay *display, ...@@ -1457,6 +1455,7 @@ on_display_status_changed (GdmDisplay *display,
{ {
int status; int status;
int display_number = -1; int display_number = -1;
char *session_type = NULL;
#ifdef WITH_PLYMOUTH #ifdef WITH_PLYMOUTH
gboolean display_is_local = FALSE; gboolean display_is_local = FALSE;
gboolean quit_plymouth = FALSE; gboolean quit_plymouth = FALSE;
...@@ -1467,7 +1466,10 @@ on_display_status_changed (GdmDisplay *display, ...@@ -1467,7 +1466,10 @@ on_display_status_changed (GdmDisplay *display,
quit_plymouth = display_is_local && manager->priv->plymouth_is_running; quit_plymouth = display_is_local && manager->priv->plymouth_is_running;
#endif #endif
g_object_get (display, "x11-display-number", &display_number, NULL); g_object_get (display,
"x11-display-number", &display_number,
"session-type", &session_type,
NULL);
status = gdm_display_get_status (display); status = gdm_display_get_status (display);
...@@ -1500,6 +1502,9 @@ on_display_status_changed (GdmDisplay *display, ...@@ -1500,6 +1502,9 @@ on_display_status_changed (GdmDisplay *display,
} }
#endif #endif
if (status == GDM_DISPLAY_FINISHED || g_strcmp0 (session_type, "x11") == 0) {
manager->priv->ran_once = TRUE;
}
maybe_start_pending_initial_login (manager, display); maybe_start_pending_initial_login (manager, display);
break; break;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment