summaryrefslogtreecommitdiff
path: root/daemon/gdm-local-display-factory.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-09-25 14:39:42 -0400
committerRay Strode <rstrode@redhat.com>2018-09-25 14:54:55 -0400
commit2882e80f72444a76a159faf622013d5c07ab46c4 (patch)
tree98470f6fd63f74c4fe26647e8736d64ffaa8f17e /daemon/gdm-local-display-factory.c
parent4176921462866d80ea0ca8eceea9e1dfd06217ae (diff)
downloadgdm-2882e80f72444a76a159faf622013d5c07ab46c4.tar.gz
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
Diffstat (limited to 'daemon/gdm-local-display-factory.c')
-rw-r--r--daemon/gdm-local-display-factory.c5
1 files changed, 4 insertions, 1 deletions
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);