From a5f51bff72e5adfb9170d2b728cff162730a1310 Mon Sep 17 00:00:00 2001 From: Victor Wheeler Date: Fri, 7 Feb 2025 12:24:00 -0700 Subject: [PATCH] docs(event): add warning not to modify Widgets during draw events. (#7685) Co-authored-by: Gabor Kiss-Vamosi --- docs/details/base-widget/event.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/details/base-widget/event.rst b/docs/details/base-widget/event.rst index 9fcbbfaff..02181edc8 100644 --- a/docs/details/base-widget/event.rst +++ b/docs/details/base-widget/event.rst @@ -156,6 +156,14 @@ Drawing Events - :cpp:enumerator:`LV_EVENT_DRAW_POST_END`: Finishing the post draw phase (when all children are drawn) - :cpp:enumerator:`LV_EVENT_DRAW_TASK_ADDED`: Adding a draw task +.. attention:: + + In drawing-event callback functions the rendering + sequence has already begun, and during this period, making changes to any + Widget's attributes, styles, or creating/deleting widgets is forbidden. If you attempt to do so, + LVGL will generate an assertion failure with a message + indicating that invalidating an area is not allowed during rendering. + Special Events --------------