standalone LUA: do not really "attach" the window to any parent

It is on a separate screen anyway.
This commit is contained in:
Raphael Coeffic
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent 0f07f2b690
commit d9c1af2080
4 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ class SelectTemplate : public TemplatePage
// Need to update() the ModelCategoryPageBody before attaching StandaloneLuaWindow to not mess up focus
update();
update = nullptr;
StandaloneLuaWindow::instance()->attach(focusWindow);
StandaloneLuaWindow::instance()->attach();
}
#endif
return 0;
+1 -1
View File
@@ -96,7 +96,7 @@ static void run_lua_tool(Window* parent, const std::string& path)
luaExec(path.c_str());
auto lua_win = StandaloneLuaWindow::instance();
lua_win->attach(parent);
lua_win->attach();
}
// LUA scripts in TOOLS
+1 -3
View File
@@ -71,15 +71,13 @@ StandaloneLuaWindow* StandaloneLuaWindow::instance()
return _instance;
}
void StandaloneLuaWindow::attach(Window* newParent)
void StandaloneLuaWindow::attach()
{
if (!prevScreen) {
// backup previous screen
prevScreen = lv_scr_act();
Window::attach(newParent->getFullScreenWindow());
// and load new one
lv_scr_load(lvobj);
+1 -1
View File
@@ -41,7 +41,7 @@ class StandaloneLuaWindow : public Window
public:
static StandaloneLuaWindow* instance();
void attach(Window* newParent);
void attach();
void deleteLater(bool detach = true, bool trash = true) override;
void paint(BitmapBuffer* dc) override;
void checkEvents() override;