diff options
author | Ray Strode <rstrode@redhat.com> | 2015-04-07 10:57:36 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2015-04-10 15:13:44 -0400 |
commit | db9ee470fb16bddd4be9755e91130c4ef099566c (patch) | |
tree | 2213e68cd0b460fe87acb720abc6ef6ff94dfb9d | |
parent | 79c40d20eab7256eb77c19bfe270544756f82f47 (diff) | |
download | gdm-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
-rw-r--r-- | daemon/gdm-launch-environment.c | 2 | ||||
-rw-r--r-- | daemon/gdm-legacy-display.c | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c index dc73ffc0..aaf78343 100644 --- a/daemon/gdm-launch-environment.c +++ b/daemon/gdm-launch-environment.c @@ -795,7 +795,7 @@ gdm_launch_environment_class_init (GdmLaunchEnvironmentClass *klass) "device", "device", NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_X11_DISPLAY_IS_LOCAL, g_param_spec_boolean ("x11-display-is-local", 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); } |