[gtk+/gtk-3-16] wayland: Silence warnings on clipboard data sending cancellation



commit 139ed7409f07140e74cc66d3c34ee43908eeb78c
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Mar 19 15:58:00 2015 +0100

    wayland: Silence warnings on clipboard data sending cancellation
    
    During copy/paste, it may be common that we receive several property changes
    around the selection atom, this results in warnings when cancelling the previous
    write attempt. We already honor the last request properly, so we should just
    cancel silently.

 gdk/wayland/gdkselection-wayland.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdkselection-wayland.c b/gdk/wayland/gdkselection-wayland.c
index 043ca7d..12a2d30 100644
--- a/gdk/wayland/gdkselection-wayland.c
+++ b/gdk/wayland/gdkselection-wayland.c
@@ -416,9 +416,11 @@ async_write_data_cb (GObject      *object,
                                                 res, &error);
   if (error)
     {
-      g_warning ("Error writing selection data: %s", error->message);
-      g_error_free (error);
+      if (error->domain != G_IO_ERROR ||
+          error->code != G_IO_ERROR_CANCELLED)
+        g_warning ("Error writing selection data: %s", error->message);
 
+      g_error_free (error);
       async_write_data_free (write_data);
       return;
     }


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