]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
fade-throbber: Support ConsoleViewerPreserveBackground option to keep the background...
authornerdopolis <bluescreen_avenger@verizon.net>
Fri, 2 Aug 2024 18:32:07 +0000 (14:32 -0400)
committern3rdopolis <bluescreenavenger@gmail.com>
Tue, 6 Aug 2024 11:33:26 +0000 (11:33 +0000)
src/plugins/splash/fade-throbber/plugin.c

index 5e594d63b0abc6ec7e42ef0d129c503873392461..f22dc651cdfed2afdf25872ddd0a5015630c45fc 100644 (file)
@@ -113,6 +113,7 @@ struct _ply_boot_splash_plugin
         uint32_t                       should_show_console_messages : 1;
         ply_buffer_t                  *boot_buffer;
         uint32_t                       console_text_color;
+        uint32_t                       console_viewer_preserve_background;
 };
 
 ply_boot_splash_plugin_interface_t *ply_boot_splash_plugin_get_interface (void);
@@ -258,6 +259,9 @@ create_plugin (ply_key_file_t *key_file)
                                        "ConsoleLogTextColor",
                                        PLY_CONSOLE_VIEWER_LOG_TEXT_COLOR);
 
+        plugin->console_viewer_preserve_background =
+                ply_key_file_get_bool (key_file, "fade-throbber", "ConsoleViewerPreserveBackground");
+
         plugin->image_dir = image_dir;
 
         plugin->state = PLY_BOOT_SPLASH_DISPLAY_NORMAL;
@@ -734,7 +738,7 @@ draw_background (view_t             *view,
 
         plugin = view->plugin;
 
-        if (plugin->should_show_console_messages) {
+        if (plugin->should_show_console_messages && plugin->console_viewer_preserve_background == false) {
                 ply_pixel_buffer_fill_with_hex_color (pixel_buffer, &area, 0);
         } else {
                 ply_pixel_buffer_fill_with_gradient (pixel_buffer, &area,