diff options
author | Hans de Goede <hdegoede@redhat.com> | 2021-03-27 16:13:26 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-03-29 09:25:29 +0200 |
commit | 9b9d7e1b3a13a544d4d55abfe88f316a8ede9377 (patch) | |
tree | bdec297359ee4b7d4b82ecf7acdea6b6eb3bd9f0 | |
parent | 9ef171f73303c78758b3f3b64133a38cd31decad (diff) |
ply-text-display: Fix bottom pixels of fbcon not getting cleared
When fbcon is used for the console then there might be some unused
rows of pixels at the bottom because the screen's height in pixel
is not fully divideable by the font height. So the remaining few
rows of pixels at the bottom are unused.
The "text" splash changes the background color of the terminal and
then does a ply_text_display_clear_screen () to clear the console
to the new background color.
ply_text_display_clear_screen () was using "ESC [ 2 J" as control-sequence
to clear the screen. Which means "clear the entire screen" but fbcon
seems to not always count the unused bottom rows part of the "entire
screen", leaving them black.
Also send an "ESC [ 3 J" control-sequence when clearing the screen,
which means "clear the entire screen; and the scrollback-buffer".
Using this does consistenly result in the unused bottom rows always
being set to the background color.
This new behavior is esp. important when hiding the splash (e.g.
when quiting) because under some circumstances (1) the "ESC [ 2 J"
would clear the unused bottom rows to plymouth's background color
and then when hiding the splash it would not clear the unused rows,
leaving the unused rows set to plymouth's background color after
plymouth has quit.
Note the "ESC [ 2 J" control sequences is also still send because older
(serial) terminals may not support the "ESC [ 3 J" control sequence.
1) The exact circumstances when this happens are unclear
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1933378
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | src/libply-splash-core/ply-text-display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libply-splash-core/ply-text-display.c b/src/libply-splash-core/ply-text-display.c index fc41645a..6eaea421 100644 --- a/src/libply-splash-core/ply-text-display.c +++ b/src/libply-splash-core/ply-text-display.c @@ -43,7 +43,7 @@ #include "ply-utils.h" #ifndef CLEAR_SCREEN_SEQUENCE -#define CLEAR_SCREEN_SEQUENCE "\033[2J" +#define CLEAR_SCREEN_SEQUENCE "\033[2J\033[3J" #endif #ifndef CLEAR_LINE_SEQUENCE |