lvgl icon indicating copy to clipboard operation
lvgl copied to clipboard

Add function to get disp->rendering_in_progress state.

Open spbgzh opened this issue 1 year ago • 1 comments

LVGL version

v9.1

What happened?

To avoid Asserted at expression: !disp->rendering_in_progress (Invalidate area is not allowed during rendering.), I need to check rendering_in_progress state, but it in lv_display_private.h, if I want to access it without "lvgl/src/display/lv_display_private.h", it will show error: invalid use of incomplete. so in this case I suggest to set a globle function to get rendering_in_progress state

How to reproduce?

#include "lvgl/src/display/lv_display_private.h" static uint8_t perform_screen_transition(lv_screen_to_t *transition) { if (disp->rendering_in_progress) { return 0; } if (transition == NULL || transition->next == NULL) return 0; if (transition->next->screen == NULL && transition->next->init != NULL) transition->next->init(); if (transition->next->screen != NULL) { lv_screen_load_anim(transition->next->screen, transition->anim, transition->speed, transition->delay, false); node = *(transition->next); return 1; } return 0; }

spbgzh avatar Jun 29 '24 14:06 spbgzh

I made a PR https://github.com/lvgl/lvgl/pull/6448

spbgzh avatar Jun 30 '24 00:06 spbgzh

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.

lvgl-bot avatar Jul 14 '24 01:07 lvgl-bot

As there was no activity here for a while we close this issue. But don't worry, the conversation is still here and you can get back to it at any time.

So feel free to comment if you have remarks or ideas on this topic.

lvgl-bot avatar Jul 22 '24 01:07 lvgl-bot