From a40f7ca541c87e6a8c4a0cefbdd89c93d66cbaba Mon Sep 17 00:00:00 2001 From: Nic Barker Date: Sat, 21 Dec 2024 06:28:10 +1300 Subject: [PATCH] fix incorrect index --- clay.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clay.h b/clay.h index b6c60c9..b486669 100644 --- a/clay.h +++ b/clay.h @@ -3558,7 +3558,7 @@ void Clay_SetPointerState(Clay_Vector2 position, bool isPointerDown) { } } - Clay_LayoutElement *rootElement = Clay_LayoutElementArray_Get(&Clay__layoutElements, Clay__int32_tArray_Get(&dfsBuffer, (int)dfsBuffer.length - 1)); + Clay_LayoutElement *rootElement = Clay_LayoutElementArray_Get(&Clay__layoutElements, root->layoutElementIndex); if (found && Clay__ElementHasConfig(rootElement, CLAY__ELEMENT_CONFIG_TYPE_FLOATING_CONTAINER) && Clay__FindElementConfigWithType(rootElement, CLAY__ELEMENT_CONFIG_TYPE_FLOATING_CONTAINER).floatingElementConfig->pointerCaptureMode == CLAY_POINTER_CAPTURE_MODE_CAPTURE) { break;