From 14f6103373ca9e00d7e7a8e7d73abee3323fac63 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Mon, 11 Sep 2023 18:25:01 +0200 Subject: [PATCH] backends/drm: don't signal commit failure for the cursor RenderLoop isn't built to handle that yet --- src/backends/drm/drm_commit_thread.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backends/drm/drm_commit_thread.cpp b/src/backends/drm/drm_commit_thread.cpp index 78192ce294..dc08c94ddd 100644 --- a/src/backends/drm/drm_commit_thread.cpp +++ b/src/backends/drm/drm_commit_thread.cpp @@ -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); }