Change screen while stuck in long running event from keypress

Using lvgl v9.1 with an embedded (400M ARM) system, the FreeRTOS thread for the LCD worker is what is triggering the menu clicks etc .

i have a situation now where I can get stuck in a long running process ( 10s of seconds potentially ) but need to change the screen to put up a message before that starts within the event and ideally make it dynamic as a progress update and then hide it all at the end

I know you’ll say shift that lot out into another thread but that doesn’t easily fit with how the rest of it works at present but is there a way to get the screen to refresh whilst deep in the indev event handling ?

You really shouldn’t be having code that can take a long time to execute in an LVGL event. It would be better to run that code in a FreeRTOS task allowing LVGL to continue about it’s business.

To directly answer your question…

Change the screen and then call lv_refr_now() to push the new screen to the display.