From 57e6f102115e2c269f78cc368af7a75aedc2721b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 6 Jan 2023 22:26:46 +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. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2029c93f1d27807019569117efee503214f63277 Author: Thilo Graf Date: 2023-01-06 (Fri, 06 Jan 2023) ------------------ This commit was generated by Migit --- 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 2d2f973c2..4424a4393 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; }