renderer: Allow DS for surfaces with inert subsurfaces (#12133)

This commit is contained in:
Dominick DiMaggio 2025-11-11 07:18:15 -05:00 committed by GitHub
parent 0b1d690676
commit b2ea6b010c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 26 additions and 7 deletions

View file

@ -602,6 +602,19 @@ void CWLSurfaceResource::sortSubsurfaces() {
}
}
bool CWLSurfaceResource::hasVisibleSubsurface() {
for (auto const& subsurface : m_subsurfaces) {
if (!subsurface || !subsurface->m_surface)
continue;
const auto& surf = subsurface->m_surface;
if (surf->m_current.size.x > 0 && surf->m_current.size.y > 0)
return true;
}
return false;
}
void CWLSurfaceResource::updateCursorShm(CRegion damage) {
if (damage.empty())
return;