diff options
| author | vaxerski <vaxry@vaxry.net> | 2025-02-04 10:18:08 +0000 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2025-02-04 10:18:08 +0000 |
| commit | 3b99e906df8b439d65e740301940e57efc057012 (patch) | |
| tree | ef1923ec2fa64d74317c0457b8722e2d015129aa /src/Compositor.cpp | |
| parent | 5e7292434a9189d0550187f8a6fb687848194a41 (diff) | |
compositor: don't iterate over unmapped ls-es in vectorToLS
fixes #9312
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 22cb70fb..a8cbae3a 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1245,7 +1245,7 @@ void CCompositor::focusSurface(SP<CWLSurfaceResource> pSurface, PHLWINDOW pWindo SP<CWLSurfaceResource> CCompositor::vectorToLayerPopupSurface(const Vector2D& pos, PHLMONITOR monitor, Vector2D* sCoords, PHLLS* ppLayerSurfaceFound) { for (auto const& lsl : monitor->m_aLayerSurfaceLayers | std::views::reverse) { for (auto const& ls : lsl | std::views::reverse) { - if (ls->fadingOut || !ls->layerSurface || (ls->layerSurface && !ls->layerSurface->mapped) || ls->alpha->value() == 0.f) + if (!ls->mapped || ls->fadingOut || !ls->layerSurface || (ls->layerSurface && !ls->layerSurface->mapped) || ls->alpha->value() == 0.f) continue; auto SURFACEAT = ls->popupHead->at(pos, true); @@ -1263,7 +1263,7 @@ SP<CWLSurfaceResource> CCompositor::vectorToLayerPopupSurface(const Vector2D& po SP<CWLSurfaceResource> CCompositor::vectorToLayerSurface(const Vector2D& pos, std::vector<PHLLSREF>* layerSurfaces, Vector2D* sCoords, PHLLS* ppLayerSurfaceFound) { for (auto const& ls : *layerSurfaces | std::views::reverse) { - if (ls->fadingOut || !ls->layerSurface || (ls->layerSurface && !ls->layerSurface->surface->mapped) || ls->alpha->value() == 0.f) + if (!ls->mapped || ls->fadingOut || !ls->layerSurface || (ls->layerSurface && !ls->layerSurface->surface->mapped) || ls->alpha->value() == 0.f) continue; auto [surf, local] = ls->layerSurface->surface->at(pos - ls->geometry.pos(), true); |
