summaryrefslogtreecommitdiff
path: root/daemon/gdm-xdmcp-display.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2015-01-29 16:25:37 -0500
committerRay Strode <rstrode@redhat.com>2015-02-18 17:34:12 -0500
commit50f32ce669d927460df4754e917a1f19f0c656bb (patch)
tree1b2e262e0008f9ef03e83e8d6d019e33953a6e56 /daemon/gdm-xdmcp-display.c
parent0cc8b02f339d7661999a08f9c35cc51d5a2d5531 (diff)
downloadgdm-50f32ce669d927460df4754e917a1f19f0c656bb.tar.gz
display: start greeter/chooser session from display object
We're trying to get rid of the slave code, so we need to move responibility for launching the greeter to the display objects. This commit changes the display classes to set up a launch environment that the base class runs. https://bugzilla.gnome.org/show_bug.cgi?id=744764
Diffstat (limited to 'daemon/gdm-xdmcp-display.c')
-rw-r--r--daemon/gdm-xdmcp-display.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/daemon/gdm-xdmcp-display.c b/daemon/gdm-xdmcp-display.c
index e09a2fdf..27f7ee5e 100644
--- a/daemon/gdm-xdmcp-display.c
+++ b/daemon/gdm-xdmcp-display.c
@@ -36,6 +36,7 @@
#include <glib-object.h>
#include "gdm-display.h"
+#include "gdm-launch-environment.h"
#include "gdm-xdmcp-display.h"
#include "gdm-common.h"
@@ -140,14 +141,50 @@ gdm_xdmcp_display_get_property (GObject *object,
}
}
+static gboolean
+gdm_xdmcp_display_prepare (GdmDisplay *display)
+{
+ GdmXdmcpDisplay *self = GDM_XDMCP_DISPLAY (display);
+ GdmLaunchEnvironment *launch_environment;
+ char *display_name;
+ char *seat_id;
+ char *hostname;
+
+ launch_environment = NULL;
+ display_name = NULL;
+ seat_id = NULL;
+ hostname = NULL;
+
+ g_object_get (self,
+ "x11-display-name", &display_name,
+ "seat-id", &seat_id,
+ "remote-hostname", &hostname,
+ "launch-environment", &launch_environment,
+ NULL);
+
+ if (launch_environment == NULL) {
+ launch_environment = gdm_create_greeter_launch_environment (display_name,
+ seat_id,
+ hostname,
+ FALSE);
+ g_object_set (self, "launch-environment", launch_environment, NULL);
+ g_object_unref (launch_environment);
+ }
+
+ return GDM_DISPLAY_CLASS (gdm_xdmcp_display_parent_class)->prepare (display);
+}
+
static void
gdm_xdmcp_display_class_init (GdmXdmcpDisplayClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GdmDisplayClass *display_class = GDM_DISPLAY_CLASS (klass);
object_class->get_property = gdm_xdmcp_display_get_property;
object_class->set_property = gdm_xdmcp_display_set_property;
+ display_class->prepare = gdm_xdmcp_display_prepare;
+
g_type_class_add_private (klass, sizeof (GdmXdmcpDisplayPrivate));
g_object_class_install_property (object_class,