From d915f3a62ca5e52d66432ea9973ff96da277c0df Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Tue, 22 Apr 2025 14:36:58 +0200 Subject: [PATCH] LVGLTest: use subwindow so everything gets cleaned --- apps/com.example.lvgltest/assets/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/com.example.lvgltest/assets/main.py b/apps/com.example.lvgltest/assets/main.py index 71e44d1c..e8bcfae4 100644 --- a/apps/com.example.lvgltest/assets/main.py +++ b/apps/com.example.lvgltest/assets/main.py @@ -15,11 +15,11 @@ canary.add_flag(0x0001) # LV_OBJ_FLAG_HIDDEN is 0x0001 def add_spinner_and_update(): global spinner_count, metrics_label try: - spinner = lv.spinner(lv.screen_active()) + spinner = lv.spinner(subwindow) spinner.set_size(SPINNER_SIZE, SPINNER_SIZE) spinner.set_pos( - random.randint(0, lv.screen_active().get_width() - SPINNER_SIZE), - random.randint(0, lv.screen_active().get_height() - SPINNER_SIZE) + random.randint(0, subwindow.get_width() - SPINNER_SIZE), + random.randint(0, subwindow.get_height() - SPINNER_SIZE) ) spinner_count += 1 except Exception as e: @@ -33,7 +33,7 @@ def run_benchmark(): global spinner_count, metrics_label print("Starting LVGL spinner benchmark...") - scr = lv.screen_active() + scr = subwindow scr.set_style_bg_color(lv.color_black(), 0) metrics_label = lv.label(scr)