File gdm-restart-session-when-X-server-restart.patch of Package gdm

Index: gdm-45.0.1/daemon/gdm-local-display-factory.c
===================================================================
--- gdm-45.0.1.orig/daemon/gdm-local-display-factory.c
+++ gdm-45.0.1/daemon/gdm-local-display-factory.c
@@ -555,10 +555,12 @@ on_display_status_changed (GdmDisplay
                 /* if this is a local display, ensure that we get a login
                  * screen when the user logs out.
                  */
+                g_debug ("GdmLocalDisplayFactory: session_class = %s active_vt = %u", session_class, factory->active_vt);
                 if (is_local &&
                     ((g_strcmp0 (session_class, "greeter") != 0 &&
                       (!seat_active_session || g_strcmp0(session_id, seat_active_session) == 0)) ||
                      (g_strcmp0 (seat_id, "seat0") == 0 && factory->active_vt == GDM_INITIAL_VT) ||
+                     (g_strcmp0 (seat_id, "seat0") == 0 && factory->active_vt == 0) ||
                      g_strcmp0 (seat_id, "seat0") != 0)) {
                         /* reset num failures */
                         factory->num_failures = 0;
Index: gdm-45.0.1/daemon/gdm-manager.c
===================================================================
--- gdm-45.0.1.orig/daemon/gdm-manager.c
+++ gdm-45.0.1/daemon/gdm-manager.c
@@ -1552,7 +1552,8 @@ on_display_status_changed (GdmDisplay *d
                         }
 #endif
 
-                        g_object_set_data (G_OBJECT (display), "gdm-user-session", NULL);
+                        if (getenv ("GDM_DISABLE_USER_DISPLAY_SERVER") == NULL )
+                                g_object_set_data (G_OBJECT (display), "gdm-user-session", NULL);
 
                         if (display == manager->automatic_login_display) {
                                 g_clear_weak_pointer (&manager->automatic_login_display);
openSUSE Build Service is sponsored by