backends/drm: don't signal commit failure for the cursor

RenderLoop isn't built to handle that yet
This commit is contained in:
Xaver Hugl 2023-09-11 18:25:01 +02:00
parent dded168d93
commit 14f6103373

View file

@ -64,12 +64,17 @@ DrmCommitThread::DrmCommitThread()
commit.release();
m_commits.erase(m_commits.begin());
} else {
const bool cursorOnly = std::all_of(m_commits.begin(), m_commits.end(), [](const auto &commit) {
return commit->isCursorOnly();
});
for (auto &commit : m_commits) {
m_droppedCommits.push_back(std::move(commit));
}
m_commits.clear();
qCWarning(KWIN_DRM) << "atomic commit failed:" << strerror(errno);
QMetaObject::invokeMethod(this, &DrmCommitThread::commitFailed, Qt::ConnectionType::QueuedConnection);
if (!cursorOnly) {
QMetaObject::invokeMethod(this, &DrmCommitThread::commitFailed, Qt::ConnectionType::QueuedConnection);
}
}
QMetaObject::invokeMethod(this, &DrmCommitThread::clearDroppedCommits, Qt::ConnectionType::QueuedConnection);
}