diff options
-rw-r--r-- | daemon/gdm-local-display-factory.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c index 1b1d2e32..bf4782d1 100644 --- a/daemon/gdm-local-display-factory.c +++ b/daemon/gdm-local-display-factory.c @@ -549,7 +549,8 @@ on_display_status_changed (GdmDisplay *display, * screen when the user logs out. */ if (is_local && - (g_strcmp0 (session_class, "greeter") != 0 || factory->active_vt == GDM_INITIAL_VT)) { + (g_strcmp0 (session_class, "greeter") != 0 || factory->active_vt == GDM_INITIAL_VT || + g_strcmp0 (seat_id, "seat0") != 0)) { /* reset num failures */ factory->num_failures = 0; @@ -631,6 +632,21 @@ lookup_prepared_display_by_seat_id (const char *id, return lookup_by_seat_id (id, display, user_data); } +static gboolean +lookup_managed_display_by_seat_id (const char *id, + GdmDisplay *display, + gpointer user_data) +{ + int status; + + status = gdm_display_get_status (display); + + if (status != GDM_DISPLAY_MANAGED) + return FALSE; + + return lookup_by_seat_id (id, display, user_data); +} + #ifdef HAVE_UDEV static gboolean udev_is_settled (GdmLocalDisplayFactory *factory) @@ -745,7 +761,7 @@ get_display_for_seat (GdmLocalDisplayFactory *factory, if (is_seat0) display = gdm_display_store_find (store, lookup_prepared_display_by_seat_id, (gpointer) seat_id); else - display = gdm_display_store_find (store, lookup_by_seat_id, (gpointer) seat_id); + display = gdm_display_store_find (store, lookup_managed_display_by_seat_id, (gpointer) seat_id); return display; } |