gbm: don't select opaque pixel formats for cursor

This commit is contained in:
Vaxry 2024-09-08 00:49:01 +01:00
parent a8eb8ae014
commit 9996d365ad

View file

@ -34,7 +34,7 @@ static SDRMFormat guessFormatFrom(std::vector<SDRMFormat> formats, bool cursor,
return *it;
}
if (!scanout) {
if (!scanout || cursor /* don't set opaque for cursor plane */) {
if (auto it = std::find_if(formats.begin(), formats.end(), [](const auto& f) { return f.drmFormat == DRM_FORMAT_ARGB8888 || f.drmFormat == DRM_FORMAT_ABGR8888; });
it != formats.end())
return *it;