Blame SOURCES/gtk-3.22.20-quiet-exit.patch

c99098
From c3503fcc84eec0bcf857cc744580aa9a4d5dc7eb Mon Sep 17 00:00:00 2001
c99098
From: Matthias Clasen <mclasen@redhat.com>
c99098
Date: Tue, 13 Apr 2021 14:10:27 -0400
c99098
Subject: [PATCH] x11: Be quiet on exit by default
c99098
c99098
The condition we check for to catch X servers going away
c99098
may not be accurate anymore, and the warning shows up in
c99098
logs, causing customers to be concerned. So, be quiet by
c99098
default, unless the user explicitly asked for a message.
c99098
---
c99098
 gdk/x11/gdkmain-x11.c | 23 ++++++-----------------
c99098
 1 file changed, 6 insertions(+), 17 deletions(-)
c99098
c99098
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
c99098
index 64c7cb4302..cd877ce3e4 100644
c99098
--- a/gdk/x11/gdkmain-x11.c
c99098
+++ b/gdk/x11/gdkmain-x11.c
c99098
@@ -240,24 +240,13 @@ gdk_x_io_error (Display *display)
c99098
   /* This is basically modelled after the code in XLib. We need
c99098
    * an explicit error handler here, so we can disable our atexit()
c99098
    * which would otherwise cause a nice segfault.
c99098
-   * We fprintf(stderr, instead of g_warning() because g_warning()
c99098
-   * could possibly be redirected to a dialog
c99098
+   * We g_debug() instead of g_warning(), because g_warning()
c99098
+   * could possibly be redirected to the log
c99098
    */
c99098
-  if (errno == EPIPE)
c99098
-    {
c99098
-      g_message ("The application '%s' lost its connection to the display %s;\n"
c99098
-                 "most likely the X server was shut down or you killed/destroyed\n"
c99098
-                 "the application.\n",
c99098
-                 g_get_prgname (),
c99098
-                 display ? DisplayString (display) : gdk_get_display_arg_name ());
c99098
-    }
c99098
-  else
c99098
-    {
c99098
-      g_message ("%s: Fatal IO error %d (%s) on X server %s.\n",
c99098
-                 g_get_prgname (),
c99098
-                 errno, g_strerror (errno),
c99098
-                 display ? DisplayString (display) : gdk_get_display_arg_name ());
c99098
-    }
c99098
+  g_debug ("%s: Fatal IO error %d (%s) on X server %s.\n",
c99098
+           g_get_prgname (),
c99098
+           errno, g_strerror (errno),
c99098
+           display ? DisplayString (display) : gdk_get_display_arg_name ());
c99098
 
c99098
   _exit (1);
c99098
 }
c99098
-- 
c99098
GitLab
c99098