Close fd DataSourceInterface::requestData

Weston does it as well and otherwise the client blocks.
This commit is contained in:
Martin Gräßlin 2014-11-27 11:23:37 +01:00
parent 0e0933cbb1
commit 1bc105e2e6

View file

@ -24,6 +24,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QStringList>
// Wayland
#include <wayland-server.h>
// system
#include <unistd.h>
namespace KWayland
{
@ -100,6 +102,7 @@ void DataSourceInterface::requestData(const QString &mimeType, qint32 fd)
Q_D();
// TODO: does this require a sanity check on the possible mimeType?
wl_data_source_send_send(d->resource, mimeType.toUtf8().constData(), int32_t(fd));
close(fd);
}
void DataSourceInterface::cancel()