]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
details: Clear newly added text-display before replaying log messages
authorHans de Goede <hdegoede@redhat.com>
Sat, 27 Mar 2021 15:34:28 +0000 (16:34 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 29 Mar 2021 07:27:01 +0000 (09:27 +0200)
When switching between the "text" splash and the "details" splash the
"text" splash's hide function clears the console/terminal before
the "details" splash replays the log messages. So on each switch
the user sees all the log messages once.

But when switching between a graphical/pixel splash and details,
the console/terminal is not touched by the graphical splash's hide
function; and the details splash's hide function deliberately does
not clear the terminal on hide, so that when booting in detailed
mode, the log messages stay on the console when plymouth exits.

This means that when switching graphical-splash -> details ->
graphical-splash -> details, the second time the details splash
gets shown, the previous set of replayed log messages is still
on the terminal and all messages are now shown twice.
(and toggling back and forth a third time makes them all show 3
times, etc).

Fix this by clearing the terminal on show, before replaying the
log messages.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
src/plugins/splash/details/plugin.c

index f534450b5c99b4aadcfd42d3d3ddec9c76cecfe1..254f682b33649ca8b490a313099fb8e7ee9afb92 100644 (file)
@@ -237,8 +237,10 @@ add_text_display (ply_boot_splash_plugin_t *plugin,
         view = view_new (plugin, display);
 
         terminal = ply_text_display_get_terminal (view->display);
-        if (ply_terminal_open (terminal))
+        if (ply_terminal_open (terminal)) {
+                ply_text_display_clear_screen (view->display);        
                 ply_terminal_activate_vt (terminal);
+        }
 
         ply_list_append_data (plugin->views, view);