summaryrefslogtreecommitdiff
path: root/daemon/gdm-legacy-display.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2015-04-07 10:57:36 -0400
committerRay Strode <rstrode@redhat.com>2015-04-10 15:13:44 -0400
commitdb9ee470fb16bddd4be9755e91130c4ef099566c (patch)
tree2213e68cd0b460fe87acb720abc6ef6ff94dfb9d /daemon/gdm-legacy-display.c
parent79c40d20eab7256eb77c19bfe270544756f82f47 (diff)
downloadgdm-db9ee470fb16bddd4be9755e91130c4ef099566c.tar.gz
legacy-display: ensure X11 display device is propagated to launch environment
Once the server associated with the login screen session is ready, we query its display device for ConsoleKit. This device needs to get propagated to the session to ensure ConsoleKit can track session activeness properly. This commit makes sure the display device is plumbed from the GdmServer object to the GdmLaunchEnvironment object where it gets used by the the login session (and subsequently the user session). https://bugzilla.gnome.org/show_bug.cgi?id=747351
Diffstat (limited to 'daemon/gdm-legacy-display.c')
-rw-r--r--daemon/gdm-legacy-display.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/daemon/gdm-legacy-display.c b/daemon/gdm-legacy-display.c
index 6214c422..9c999232 100644
--- a/daemon/gdm-legacy-display.c
+++ b/daemon/gdm-legacy-display.c
@@ -144,6 +144,21 @@ on_server_ready (GdmServer *server,
g_debug ("GdmDisplay: could not connect to display");
gdm_display_unmanage (GDM_DISPLAY (self));
} else {
+ GdmLaunchEnvironment *launch_environment;
+ char *display_device;
+
+ display_device = gdm_server_get_display_device (server);
+
+ g_object_get (G_OBJECT (self),
+ "launch-environment", &launch_environment,
+ NULL);
+ g_object_set (G_OBJECT (launch_environment),
+ "x11-display-device",
+ display_device,
+ NULL);
+ g_clear_pointer(&display_device, g_free);
+ g_clear_object (&launch_environment);
+
g_debug ("GdmDisplay: connected to display");
g_object_set (G_OBJECT (self), "status", GDM_DISPLAY_MANAGED, NULL);
}