Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit e637d432 authored by Martin Flöser's avatar Martin Flöser

Remove potential endless loop from XClipboardSyncTest

We need to wait till the helper process created the datadevice. For this
we used a while loop. On the test gets stuck in this loop
and times out after 10 minutes.

This change introduces a dedicated signal and we just wait for it. So if
something fails we wait only 5 sec instead of endless. This should help
investigate why the test doesn't work on

Test Plan: Test works locally

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision:
parent f4663072
......@@ -56,6 +56,8 @@ void XClipboardSyncTest::initTestCase()
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2));
QSignalSpy clipboardSyncDevicedCreated{waylandServer(), &WaylandServer::xclipboardSyncDataDeviceCreated};
......@@ -65,8 +67,8 @@ void XClipboardSyncTest::initTestCase()
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
// wait till the xclipboard sync data device is created
while (waylandServer()->xclipboardSyncDataDevice().isNull()) {
if (clipboardSyncDevicedCreated.empty()) {
......@@ -246,6 +246,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags)
[this] (DataDeviceInterface *ddi) {
if (ddi->client() == m_xclipbaordSync.client && m_xclipbaordSync.client != nullptr) {
m_xclipbaordSync.ddi = QPointer<DataDeviceInterface>(ddi);
emit xclipboardSyncDataDeviceCreated();
connect(, &DataDeviceInterface::selectionChanged, this,
[this] {
// testing whether the active client inherits Client
......@@ -210,6 +210,7 @@ Q_SIGNALS:
void terminatingInternalClientConnection();
void initialized();
void foreignTransientChanged(KWayland::Server::SurfaceInterface *child);
void xclipboardSyncDataDeviceCreated();
void setupX11ClipboardSync();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment