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-04 16:09:54 -0400
commitd7eda0dde0abaade523b1485e1803cee29d1c824 (patch)
treea4916cd926be565e9420995f280791cdc1d58a6d
parent9189a50bca70ded7149f89aaba0122c9fb249348 (diff)
downloadgdm-d7eda0dde0abaade523b1485e1803cee29d1c824.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