[gdm/wip/gdm-vt-switch-fixes: 6/6] local-display-factory: handle reviving displays that are waiting to die



commit 2882e80f72444a76a159faf622013d5c07ab46c4
Author: Ray Strode <rstrode redhat com>
Date:   Tue Sep 25 14:39:42 2018 -0400

    local-display-factory: handle reviving displays that are waiting to die
    
    We may end up re-using a display in waiting-to-finish state before it gets
    finished in this case reset its state to managed to avoid it getting
    finished while it is being used.
    
    Closes https://gitlab.gnome.org/GNOME/gdm/merge_requests/45

 daemon/gdm-local-display-factory.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index 244a3201..891c2537 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -456,7 +456,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);
                         g_debug ("GdmLocalDisplayFactory: session %s found, activating.",
                                  login_session_id);
                         gdm_activate_session_by_id (factory->priv->connection, seat_id, login_session_id);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]