compositor: fix incorrect cast, use lambda capture instead (#9161)

This commit is contained in:
heather7283 2025-01-25 03:26:46 +04:00 committed by GitHub
parent d8f79d7678
commit 1815f9a2e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2519,13 +2519,13 @@ PHLLS CCompositor::getLayerSurfaceFromSurface(SP<CWLSurfaceResource> pSurface) {
continue;
ls->layerSurface->surface->breadthfirst(
[](SP<CWLSurfaceResource> surf, const Vector2D& offset, void* data) {
if (surf == ((std::pair<SP<CWLSurfaceResource>, bool>*)data)->first) {
*(bool*)data = true;
[&result](SP<CWLSurfaceResource> surf, const Vector2D& offset, void* data) {
if (surf == result.first) {
result.second = true;
return;
}
},
&result);
nullptr);
if (result.second)
return ls;