summaryrefslogtreecommitdiff
path: root/daemon/gdm-session.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2015-01-20 09:05:35 -0500
committerRay Strode <rstrode@redhat.com>2015-02-18 17:34:13 -0500
commite29372cedc5acaca24b61d7a4ca4606a31ccc962 (patch)
tree65f6b154c3db08bd7d8b066913bc83103446177b /daemon/gdm-session.c
parent804f7786a2ed2800a6c0fb72f4ce69f8e2d91d07 (diff)
downloadgdm-e29372cedc5acaca24b61d7a4ca4606a31ccc962.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. https://bugzilla.gnome.org/show_bug.cgi?id=744764
Diffstat (limited to 'daemon/gdm-session.c')
-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 ec058590..627796aa 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;