mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-07 18:58:01 +02:00
Restore color palette when stopping text plugin
If we don't restore the color palette then the details view / post boot up messages get drawn with the wrong colors.
This commit is contained in:
parent
1fdc657b91
commit
77247462fa
3 changed files with 18 additions and 1 deletions
|
|
@ -195,6 +195,14 @@ ply_window_restore_color_palette (ply_window_t *window)
|
|||
ply_window_change_color_palette (window);
|
||||
}
|
||||
|
||||
void
|
||||
ply_window_reset_colors (ply_window_t *window)
|
||||
{
|
||||
assert (window != NULL);
|
||||
|
||||
ply_window_restore_color_palette (window);
|
||||
}
|
||||
|
||||
static void
|
||||
process_backspace (ply_window_t *window)
|
||||
{
|
||||
|
|
@ -442,9 +450,16 @@ ply_window_open (ply_window_t *window)
|
|||
|
||||
if (window->vt_number == 0)
|
||||
{
|
||||
char tty_name[512] = "";
|
||||
|
||||
window->vt_number = get_active_vt ();
|
||||
free (window->tty_name);
|
||||
asprintf (&window->tty_name, "/dev/tty%d", window->vt_number);
|
||||
window->tty_name = NULL;
|
||||
|
||||
if (readlink ("/proc/self/fd/0", tty_name, sizeof (tty_name) - 1) < 0)
|
||||
return false;
|
||||
|
||||
window->tty_name = strdup (tty_name);
|
||||
}
|
||||
|
||||
window->tty_fd = open (window->tty_name, O_RDWR | O_NOCTTY);
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ uint32_t ply_window_get_color_hex_value (ply_window_t *window,
|
|||
void ply_window_set_color_hex_value (ply_window_t *window,
|
||||
ply_window_color_t color,
|
||||
uint32_t hex_value);
|
||||
void ply_window_reset_colors (ply_window_t *window);
|
||||
|
||||
void ply_window_attach_to_event_loop (ply_window_t *window,
|
||||
ply_event_loop_t *loop);
|
||||
|
|
|
|||
|
|
@ -273,6 +273,7 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin,
|
|||
ply_window_set_background_color (plugin->window, PLY_WINDOW_COLOR_DEFAULT);
|
||||
ply_window_clear_screen (plugin->window);
|
||||
ply_window_show_text_cursor (plugin->window);
|
||||
ply_window_reset_colors (plugin->window);
|
||||
|
||||
plugin->window = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue