summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2016-07-19 16:54:43 -0400
committerRay Strode <rstrode@redhat.com>2016-12-13 14:57:28 -0500
commit6ae733e46b189c1f47b04001d19479d0e06282dc (patch)
tree3cc1585d2154667fef93defbac84293b2aebcc31
parentca9006193b275dbbecae44e2d8366eed6817fb7e (diff)
downloadgdm-6ae733e46b189c1f47b04001d19479d0e06282dc.tar.gz
xdmcp-display-factory: notify remote display when session ended
gnome-shell and the session dbus daemon don't automatically exit when gnome-session does. They, instead, wait for the display to exit or regenerate. If the display is remote, that won't happen until the keep alive timeout. This commit changes GDM to explicitly notify the remote display when the session is over, so that it can regenerate immediately. https://bugzilla.gnome.org/show_bug.cgi?id=776059
-rw-r--r--daemon/gdm-xdmcp-display-factory.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/daemon/gdm-xdmcp-display-factory.c b/daemon/gdm-xdmcp-display-factory.c
index 328ec37b..b9ab921c 100644
--- a/daemon/gdm-xdmcp-display-factory.c
+++ b/daemon/gdm-xdmcp-display-factory.c
@@ -210,7 +210,10 @@ enum {
static void gdm_xdmcp_display_factory_class_init (GdmXdmcpDisplayFactoryClass *klass);
static void gdm_xdmcp_display_factory_init (GdmXdmcpDisplayFactory *manager);
static void gdm_xdmcp_display_factory_finalize (GObject *object);
-
+static void gdm_xdmcp_send_alive (GdmXdmcpDisplayFactory *factory,
+ GdmAddress *address,
+ CARD16 dspnum,
+ CARD32 sessid);
static gpointer xdmcp_display_factory_object = NULL;
G_DEFINE_TYPE (GdmXdmcpDisplayFactory, gdm_xdmcp_display_factory, GDM_TYPE_DISPLAY_FACTORY)
@@ -2065,6 +2068,9 @@ on_display_status_changed (GdmDisplay *display,
GdmDisplayStore *store;
GdmLaunchEnvironment *launch_environment;
GdmSession *session;
+ GdmAddress *address;
+ gint32 session_number;
+ int display_number;
store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
@@ -2081,6 +2087,13 @@ on_display_status_changed (GdmDisplay *display,
g_debug ("GdmXdmcpDisplayFactory: xdmcp display status changed: %d", status);
switch (status) {
case GDM_DISPLAY_FINISHED:
+ g_object_get (display,
+ "remote-address", &address,
+ "x11-display-number", &display_number,
+ "session-number", &session_number,
+ NULL);
+ gdm_xdmcp_send_alive (factory, address, display_number, session_number);
+
gdm_display_store_remove (store, display);
break;
case GDM_DISPLAY_FAILED: