compositor: don't iterate over unmapped ls-es in vectorToLS
fixes #9312
This commit is contained in:
parent
5e7292434a
commit
3b99e906df
1 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
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& lsl : monitor->m_aLayerSurfaceLayers | std::views::reverse) {
|
||||||
for (auto const& ls : lsl | 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;
|
continue;
|
||||||
|
|
||||||
auto SURFACEAT = ls->popupHead->at(pos, true);
|
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) {
|
SP<CWLSurfaceResource> CCompositor::vectorToLayerSurface(const Vector2D& pos, std::vector<PHLLSREF>* layerSurfaces, Vector2D* sCoords, PHLLS* ppLayerSurfaceFound) {
|
||||||
for (auto const& ls : *layerSurfaces | std::views::reverse) {
|
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;
|
continue;
|
||||||
|
|
||||||
auto [surf, local] = ls->layerSurface->surface->at(pos - ls->geometry.pos(), true);
|
auto [surf, local] = ls->layerSurface->surface->at(pos - ls->geometry.pos(), true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue