summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2015-01-20 09:05:35 -0500
committerRay Strode <rstrode@redhat.com>2015-02-16 23:36:03 -0500
commit3d22b06927829087961ad9b6f265d5bfca86adcb (patch)
tree22df900401a05729ecdf4945a9663d3c517d7745
parent9bdb5ad90d95a4125b2797fff234026b8f52b149 (diff)
downloadgdm-3d22b06927829087961ad9b6f265d5bfca86adcb.tar.gz
session: track login session display mode separate from user sessions
In the future X based user sessions will get their own VT just like wayland sessions do. For the time being, the login screen still needs to use the VT and X server set up by the slave code though. This commit makes sure that the two cases are handled distinctly, so down the line they can be given different values.
-rw-r--r--daemon/gdm-session.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index f271477b..6e769841 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -124,6 +124,8 @@ struct _GdmSessionPrivate
GDBusServer *worker_server;
GDBusServer *outside_server;
GHashTable *environment;
+
+ gboolean is_program_session : 1;
};
enum {
@@ -2194,6 +2196,7 @@ gdm_session_setup_for_user (GdmSession *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);
}
@@ -2207,6 +2210,7 @@ gdm_session_setup_for_program (GdmSession *self,
g_return_if_fail (GDM_IS_SESSION (self));
+ self->priv->is_program_session = TRUE;
send_setup_for_program (self, service_name, username, log_file);
}
@@ -2916,6 +2920,14 @@ gdm_session_get_display_mode (GdmSession *self)
}
#endif
+ /* The X session used for the login screen uses the
+ * X server started up by the slave, so it should be
+ * reuse VT
+ */
+ if (self->priv->is_program_session) {
+ return GDM_SESSION_DISPLAY_MODE_REUSE_VT;
+ }
+
/* X sessions are for now ran in classic mode where
* we reuse the existing greeter. */
return GDM_SESSION_DISPLAY_MODE_REUSE_VT;