diff options
author | Ray Strode <rstrode@redhat.com> | 2016-07-19 16:54:43 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2017-03-01 10:56:23 -0500 |
commit | c8e73b4c56d80c998b48f93242c4587c595506d2 (patch) | |
tree | 3cc1585d2154667fef93defbac84293b2aebcc31 | |
parent | 4a77d67705dc3a4250a75af6d0a51f293814a255 (diff) | |
download | gdm-c8e73b4c56d80c998b48f93242c4587c595506d2.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.c | 15 |
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: |