[gtk+] wayland: Don't warn if the display is lost, skip exit handlers



commit 385a46b5c0c0b8f429efab38f7b09f02f983b3ff
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed May 24 16:42:01 2017 +0200

    wayland: Don't warn if the display is lost, skip exit handlers
    
    There is no need to have every application log a warning when the
    Wayland display server goes away, and we are using _exit instead of
    exit elsewhere.
    
    This is also what the X11 backend does (see gdk_x_io_error).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745289

 gdk/wayland/gdkeventsource.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gdk/wayland/gdkeventsource.c b/gdk/wayland/gdkeventsource.c
index bdb4c80..7016af9 100644
--- a/gdk/wayland/gdkeventsource.c
+++ b/gdk/wayland/gdkeventsource.c
@@ -20,7 +20,7 @@
 #include "gdkinternals.h"
 #include "gdkprivate-wayland.h"
 
-#include <stdlib.h>
+#include <unistd.h>
 #include <errno.h>
 
 typedef struct _GdkWaylandEventSource {
@@ -200,15 +200,15 @@ _gdk_wayland_display_queue_events (GdkDisplay *display)
 
   if (wl_display_dispatch_pending (display_wayland->wl_display) < 0)
     {
-      g_warning ("Error %d (%s) dispatching to Wayland display.",
+      g_message ("Error %d (%s) dispatching to Wayland display.",
                  errno, g_strerror (errno));
-      exit (1);
+      _exit (1);
     }
 
   if (source->pfd.revents & (G_IO_ERR | G_IO_HUP))
     {
-      g_warning ("Lost connection to Wayland compositor.");
-      exit (1);
+      g_message ("Lost connection to Wayland compositor.");
+      _exit (1);
     }
   source->pfd.revents = 0;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]