[gdm] legacy-display: ensure X server is dead when respawning
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] legacy-display: ensure X server is dead when respawning
- Date: Tue, 10 Oct 2017 17:24:51 +0000 (UTC)
commit 7f08535cbcb73697d151dde8fa113ed08d0b4175
Author: Ray Strode <rstrode redhat com>
Date: Wed Jul 12 10:26:37 2017 -0400
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
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 9c99923..d9c4336 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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]