diff options
author | Ray Strode <rstrode@redhat.com> | 2017-07-12 10:26:37 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2017-10-10 13:23:18 -0400 |
commit | 7f08535cbcb73697d151dde8fa113ed08d0b4175 (patch) | |
tree | 1960e9bef893900e6d8ea66b65980648af933279 /daemon | |
parent | b5fb83e5d1cc70685ddcf88a66b3f29a9857d7b9 (diff) | |
download | gdm-7f08535cbcb73697d151dde8fa113ed08d0b4175.tar.gz |
legacy-display: ensure X server is dead when respawning
If the user logs out we may detect the session dying before
we detect the X server dying. If that happens, then we
currently don't wait for the X server to exit before starting
a new X server.
This commit makes sure to explicitly kill the X server and wait
for its death before proceeding.
https://bugzilla.gnome.org/show_bug.cgi?id=788786
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/gdm-legacy-display.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/daemon/gdm-legacy-display.c b/daemon/gdm-legacy-display.c index 9c999232..d9c43366 100644 --- a/daemon/gdm-legacy-display.c +++ b/daemon/gdm-legacy-display.c @@ -263,10 +263,31 @@ gdm_legacy_display_class_init (GdmLegacyDisplayClass *klass) } static void +on_display_status_changed (GdmLegacyDisplay *self) +{ + int status; + + status = gdm_display_get_status (self); + + switch (status) { + case GDM_DISPLAY_UNMANAGED: + if (self->priv->server != NULL) + gdm_server_stop (self->priv->server); + break; + default: + break; + } +} + +static void gdm_legacy_display_init (GdmLegacyDisplay *legacy_display) { legacy_display->priv = GDM_LEGACY_DISPLAY_GET_PRIVATE (legacy_display); + + g_signal_connect (legacy_display, "notify::status", + G_CALLBACK (on_display_status_changed), + NULL); } GdmDisplay * |