diff --git a/src/platform/x11/systemclipboard/waylandclipboard.cpp b/src/platform/x11/systemclipboard/waylandclipboard.cpp index ed5089ef8..0000403d0 100644 --- a/src/platform/x11/systemclipboard/waylandclipboard.cpp +++ b/src/platform/x11/systemclipboard/waylandclipboard.cpp @@ -319,9 +319,12 @@ QVariant DataControlOffer::retrieveData(const QString &mimeType, QVariant::Type wl_display_flush(display); ReceiveThread thread(pipeFds[0]); + QEventLoop loop; + connect(&thread, &QThread::finished, &loop, &QEventLoop::quit); thread.start(); - while (thread.isRunning()) - QCoreApplication::processEvents(); + if (thread.isRunning()) + loop.exec(); + const auto data = thread.data(); if (!data.isEmpty() && mimeType == applicationQtXImageLiteral()) {