fix(lua): widget background function not always run when offscreen (#5399)

This commit is contained in:
philmoz
2024-08-09 10:44:44 +10:00
committed by GitHub
parent 3f04b19113
commit 317bb052bc
2 changed files with 45 additions and 43 deletions
+2 -3
View File
@@ -127,8 +127,6 @@ class LuaWidget : public Widget, public LuaEventHandler, public LuaLvglManager
void clear() override;
LuaWidgetFactory* luaFactory() const { return (LuaWidgetFactory*)factory; }
bool isCreated() const { return created; }
void setCreated() { created = true; }
Window* getCurrentParent() const override { return tempParent ? tempParent : (Window*)this; }
@@ -141,9 +139,10 @@ class LuaWidget : public Widget, public LuaEventHandler, public LuaLvglManager
protected:
bool created = false;
lv_obj_t* errorLabel = nullptr;
int luaWidgetDataRef = 0;
// Calls LUA widget 'refresh' method
void refresh(BitmapBuffer* dc);
int luaWidgetDataRef = 0;
// Window interface
void onEvent(event_t event) override;