Skip to content

Commit

Permalink
compositor: fix incorrect cast, use lambda capture instead (#9161)
Browse files Browse the repository at this point in the history
  • Loading branch information
heather7283 authored Jan 24, 2025
1 parent d8f79d7 commit 1815f9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Compositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1815f9a

Please sign in to comment.