From df7b3e73b1978a1204a005b3f089b1dc9d7865a5 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 5 Dec 2022 13:56:47 +0100 Subject: [PATCH] plugins: use optional flag to handle background behavior of lua plugins Old behavior is untouched, but Lua plugins which are using neutrino-lua APi can manage background behavior of their windows by themselves. This flag allows more flexibility. --- src/gui/plugins.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/plugins.cpp b/src/gui/plugins.cpp index 08e77b16b..22b141b1f 100644 --- a/src/gui/plugins.cpp +++ b/src/gui/plugins.cpp @@ -393,8 +393,14 @@ int CPlugins::startLuaPlugin(int number) #if 0 frameBuffer->ClearFB(); #endif - videoDecoder->Pig(-1, -1, -1, -1); - frameBuffer->paintBackground(); + std::string keep_bg_flag = "/tmp/.keep_background"; + if (!file_exists(keep_bg_flag)) + { + videoDecoder->Pig(-1, -1, -1, -1); + frameBuffer->paintBackground(); + } + else + remove(keep_bg_flag.c_str()); return plugin_list[number].menu_return; }