diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c index c15a9a659a6d3c814b54c852c4b55cb34048513a..c43531e9d557d6e5fd29bf74162907f987e913be 100644 --- a/daemon/gdm-local-display-factory.c +++ b/daemon/gdm-local-display-factory.c @@ -447,6 +447,8 @@ create_display (GdmLocalDisplayFactory *factory, /* Ensure we don't create the same display more than once */ if (display != NULL) { g_debug ("GdmLocalDisplayFactory: display already created"); + if (gdm_display_get_status (display) == GDM_DISPLAY_WAITING_TO_FINISH) + g_object_set (G_OBJECT (display), "status", GDM_DISPLAY_MANAGED, NULL); return NULL; } @@ -462,7 +464,10 @@ create_display (GdmLocalDisplayFactory *factory, display = gdm_display_store_find (store, lookup_by_session_id, (gpointer) login_session_id); - if (display != NULL && gdm_display_get_status (display) == GDM_DISPLAY_MANAGED) { + if (display != NULL && + (gdm_display_get_status (display) == GDM_DISPLAY_MANAGED || + gdm_display_get_status (display) == GDM_DISPLAY_WAITING_TO_FINISH)) { + g_object_set (G_OBJECT (display), "status", GDM_DISPLAY_MANAGED, NULL); if (g_strcmp0 (active_session_id, login_session_id) != 0) { g_debug ("GdmLocalDisplayFactory: session %s found, activating.", login_session_id); @@ -766,19 +771,6 @@ on_vt_changed (GIOChannel *source, return G_SOURCE_CONTINUE; } - ret = sd_seat_get_active ("seat0", &active_session_id, NULL); - - if (ret == 0) { - g_autofree char *state = NULL; - ret = sd_session_get_state (active_session_id, &state); - - /* if there's something already running on the active VT then bail */ - if (ret == 0 && g_strcmp0 (state, "closing") != 0) { - g_debug ("GdmLocalDisplayFactory: initial VT is in use, so ignoring"); - return G_SOURCE_CONTINUE; - } - } - if (gdm_local_display_factory_use_wayland ()) session_type = "wayland";