summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2017-04-27 10:20:09 -0400
committerRay Strode <rstrode@redhat.com>2017-05-09 17:09:10 -0400
commit88254fe1aa29ca8c5a61d231bd880b7fb6be5d69 (patch)
tree18c9ed569c8e09598ba9a56271fdf0eea3fb9fab
parent5cd92e6594a945b58c668b4d177993e62a0eced2 (diff)
downloadgdm-88254fe1aa29ca8c5a61d231bd880b7fb6be5d69.tar.gz
session: update session type when session is read
We currently update the session type (to either wayland or x11) when we first start the PAM conversation and later when the username is set (if the user is not set at the same time as the PAM conversation). There's a race that means the session won't necessarly have been read from accountsservice at these points. This commit changes the code to instead update the session type in result to the session actually getting read. https://bugzilla.gnome.org/show_bug.cgi?id=781825
-rw-r--r--daemon/gdm-session.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 08d61de6..ff3a1acb 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -938,11 +938,8 @@ worker_on_saved_session_name_read (GdmDBusWorker *worker,
g_debug ("GdmSession: not using invalid .dmrc session: %s", session_name);
g_free (self->priv->saved_session);
self->priv->saved_session = NULL;
- return;
- }
-
- if (strcmp (session_name,
- get_default_session_name (self)) != 0) {
+ } else if (strcmp (session_name,
+ get_default_session_name (self)) != 0) {
g_free (self->priv->saved_session);
self->priv->saved_session = g_strdup (session_name);
@@ -951,6 +948,9 @@ worker_on_saved_session_name_read (GdmDBusWorker *worker,
session_name);
}
}
+
+ update_session_type (self);
+
}
static GdmSessionConversation *
@@ -2295,8 +2295,9 @@ gdm_session_setup (GdmSession *self,
g_return_if_fail (GDM_IS_SESSION (self));
+ update_session_type (self);
+
send_setup (self, service_name);
- gdm_session_defaults_changed (self);
}
@@ -2309,11 +2310,12 @@ gdm_session_setup_for_user (GdmSession *self,
g_return_if_fail (GDM_IS_SESSION (self));
g_return_if_fail (username != NULL);
+ update_session_type (self);
+
gdm_session_select_user (self, username);
self->priv->is_program_session = FALSE;
send_setup_for_user (self, service_name);
- gdm_session_defaults_changed (self);
}
void