summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2014-04-11 14:54:04 -0400
committerRay Strode <rstrode@redhat.com>2014-04-14 15:02:28 -0400
commit2860eb3a0391332a7e06df6edbd77b988ec624c3 (patch)
tree23e99b4952c28cfe8ed38583a3f9b444a929e9d9
parent6e1f486ca0d37da9fc8239493633deed6d796b93 (diff)
downloadgdm-2860eb3a0391332a7e06df6edbd77b988ec624c3.tar.gz
session: make sure session display mode is set even if session isn't explicitly picked
Right now we we only set the display mode when a user picks a session from the session list. That means the wrong display mode will get used if wayland is saved from a previous log in. This commit makes sure the display mode gets set as soon as the user credentials are established, since at the point log in is imminent. https://bugzilla.gnome.org/show_bug.cgi?id=728204
-rw-r--r--daemon/gdm-session.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index d44a522e..f759d2df 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -335,6 +335,8 @@ on_establish_credentials_cb (GdmDBusWorker *proxy,
service_name = conversation->service_name;
if (worked) {
+ GdmSessionDisplayMode mode;
+
switch (self->priv->verification_mode) {
case GDM_SESSION_VERIFICATION_MODE_REAUTHENTICATE:
if (self->priv->user_verifier_interface != NULL) {
@@ -346,6 +348,10 @@ on_establish_credentials_cb (GdmDBusWorker *proxy,
case GDM_SESSION_VERIFICATION_MODE_LOGIN:
case GDM_SESSION_VERIFICATION_MODE_CHOOSER:
+ mode = gdm_session_get_display_mode (self);
+ gdm_dbus_worker_call_set_session_display_mode (conversation->worker_proxy,
+ gdm_session_display_mode_to_string (mode),
+ NULL, NULL, NULL);
gdm_session_open_session (self, service_name);
break;
default:
@@ -2833,7 +2839,6 @@ gdm_session_select_session (GdmSession *self,
{
GHashTableIter iter;
gpointer key, value;
- GdmSessionDisplayMode mode;
g_free (self->priv->selected_session);
@@ -2843,8 +2848,6 @@ gdm_session_select_session (GdmSession *self,
self->priv->selected_session = g_strdup (text);
}
- mode = gdm_session_get_display_mode (self);
-
g_hash_table_iter_init (&iter, self->priv->conversations);
while (g_hash_table_iter_next (&iter, &key, &value)) {
GdmSessionConversation *conversation;
@@ -2854,9 +2857,6 @@ gdm_session_select_session (GdmSession *self,
gdm_dbus_worker_call_set_session_name (conversation->worker_proxy,
get_session_name (self),
NULL, NULL, NULL);
- gdm_dbus_worker_call_set_session_display_mode (conversation->worker_proxy,
- gdm_session_display_mode_to_string (mode),
- NULL, NULL, NULL);
}
}