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