From a011fe74b2071bb455b3b498f8978d1079f624e5 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Fri, 31 Dec 2021 14:39:26 +0100 Subject: [PATCH] linuxdmabuf: fix sending default tranches Only the first one was getting sent --- src/wayland/linuxdmabufv1clientbuffer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/wayland/linuxdmabufv1clientbuffer.cpp b/src/wayland/linuxdmabufv1clientbuffer.cpp index d0795dc8aa..666cb7d009 100644 --- a/src/wayland/linuxdmabufv1clientbuffer.cpp +++ b/src/wayland/linuxdmabufv1clientbuffer.cpp @@ -491,8 +491,11 @@ void LinuxDmaBufV1FeedbackPrivate::send(Resource *resource) sendTranche(tranche); } // send default hints as the last fallback tranche - if (this != get(m_bufferintegration->defaultFeedback.data())) { - sendTranche(get(m_bufferintegration->defaultFeedback.data())->m_tranches[0]); + const auto defaultFeedbackPrivate = get(m_bufferintegration->defaultFeedback.data()); + if (this != defaultFeedbackPrivate) { + for (const auto &tranche : qAsConst(defaultFeedbackPrivate->m_tranches)) { + sendTranche(tranche); + } } send_done(resource->handle); }