compositor: fix incorrect cast, use lambda capture instead (#9161)
This commit is contained in:
parent
d8f79d7678
commit
1815f9a2e5
1 changed files with 4 additions and 4 deletions
|
|
@ -2519,13 +2519,13 @@ PHLLS CCompositor::getLayerSurfaceFromSurface(SP<CWLSurfaceResource> pSurface) {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ls->layerSurface->surface->breadthfirst(
|
ls->layerSurface->surface->breadthfirst(
|
||||||
[](SP<CWLSurfaceResource> surf, const Vector2D& offset, void* data) {
|
[&result](SP<CWLSurfaceResource> surf, const Vector2D& offset, void* data) {
|
||||||
if (surf == ((std::pair<SP<CWLSurfaceResource>, bool>*)data)->first) {
|
if (surf == result.first) {
|
||||||
*(bool*)data = true;
|
result.second = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
&result);
|
nullptr);
|
||||||
|
|
||||||
if (result.second)
|
if (result.second)
|
||||||
return ls;
|
return ls;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue