mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-03 13:41:59 -07:00
compositor: fix incorrect cast, use lambda capture instead (#9161)
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user