[gtk+] wayland: Silence warnings on clipboard data sending cancellation
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Silence warnings on clipboard data sending cancellation
- Date: Thu, 19 Mar 2015 15:09:23 +0000 (UTC)
commit 6c8c37abbb641f3959ab45a5de4adb2aeb36f653
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]