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.
This commit is contained in:
Carlos Garnacho 2015-03-19 15:58:00 +01:00
parent d5160bb950
commit 6c8c37abbb

View File

@ -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;
}