The fd must be closed on async_write_data_free(), but we should also
initialize it to -1 so gdk_wayland_selection_check_write() doesn't wrongly
pick the stdin fd.
https://bugzilla.gnome.org/show_bug.cgi?id=751414
selection->selection_buffers =
g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) selection_buffer_cancel_and_unref);
+ selection->stored_selection.fd = -1;
return selection;
}
static void
async_write_data_free (AsyncWriteData *write_data)
{
+ close (write_data->selection->stored_selection.fd);
+ write_data->selection->stored_selection.fd = -1;
g_object_unref (write_data->stream);
g_slice_free (AsyncWriteData, write_data);
}