diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index 6c739a06..e8a2e512 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -4013,7 +4013,7 @@ void YGNodeCalculateLayoutWithContext( void* layoutContext) { #ifdef YG_ENABLE_EVENTS - Event::publish(node); + Event::publish(node, {layoutContext}); #endif // unique pointer to allow ending the marker early std::unique_ptr> marker{ diff --git a/yoga/event/event.h b/yoga/event/event.h index 9dcd73b6..e7415566 100644 --- a/yoga/event/event.h +++ b/yoga/event/event.h @@ -72,6 +72,11 @@ struct Event::TypedData { YGConfig* config; }; +template <> +struct Event::TypedData { + void* layoutContext; +}; + template <> struct Event::TypedData { void* layoutContext;