mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-25 17:21:54 -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;
|
||||
|
||||
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;
|
||||
|
Reference in New Issue
Block a user