boot-splash: set KD_TEXT from main instead of boot_splash object

Now that debugging keybindings are gone, ply-boot-splash is really
just a wrapper around splash plugins.  As such, it doesn't really
make sense to be mucking with terminal objects from it.

This commit moves that mucking to main until I can find a better
destination for it.
This commit is contained in:
Ray Strode 2013-12-02 22:07:37 -05:00
parent ca0b7cc87d
commit 9b211cb173
2 changed files with 17 additions and 41 deletions

View file

@ -102,32 +102,6 @@ ply_boot_splash_new (const char *theme_path,
return splash;
}
static ply_terminal_t *
find_local_console_terminal (ply_boot_splash_t *splash)
{
ply_list_node_t *node;
node = ply_list_get_first_node (splash->text_displays);
while (node != NULL)
{
ply_text_display_t *display;
ply_terminal_t *terminal;
ply_list_node_t *next_node;
display = ply_list_node_get_data (node);
next_node = ply_list_get_next_node (splash->text_displays, node);
terminal = ply_text_display_get_terminal (display);
if (terminal != NULL && ply_terminal_is_vt (terminal))
return terminal;
node = next_node;
}
return NULL;
}
void
ply_boot_splash_set_keyboard (ply_boot_splash_t *splash,
ply_keyboard_t *keyboard)
@ -574,16 +548,6 @@ ply_boot_splash_hide (ply_boot_splash_t *splash)
splash->plugin_interface->hide_splash_screen (splash->plugin,
splash->loop);
if (ply_list_get_length (splash->pixel_displays) >= 1)
{
ply_terminal_t *terminal;
terminal = find_local_console_terminal (splash);
if (terminal != NULL)
ply_terminal_set_mode (terminal, PLY_TERMINAL_MODE_TEXT);
}
splash->mode = PLY_BOOT_SPLASH_MODE_INVALID;
if (splash->loop != NULL)

View file

@ -1004,6 +1004,18 @@ quit_splash (state_t *state)
detach_from_running_session (state);
}
static void
hide_splash (state_t *state)
{
if (state->boot_splash == NULL)
return;
ply_boot_splash_hide (state->boot_splash);
if (state->local_console_terminal != NULL)
ply_terminal_set_mode (state->local_console_terminal, PLY_TERMINAL_MODE_TEXT);
}
static void
dump_details_and_quit_splash (state_t *state)
{
@ -1012,8 +1024,8 @@ dump_details_and_quit_splash (state_t *state)
if (state->renderer != NULL)
ply_renderer_deactivate (state->renderer);
if (state->boot_splash != NULL)
ply_boot_splash_hide (state->boot_splash);
hide_splash (state);
state->is_shown = false;
@ -1126,8 +1138,8 @@ on_boot_splash_idle (state_t *state)
ply_trace ("hiding splash");
if (state->renderer != NULL)
ply_renderer_deactivate (state->renderer);
if (state->boot_splash != NULL)
ply_boot_splash_hide (state->boot_splash);
hide_splash (state);
state->is_shown = false;
}
@ -1372,7 +1384,7 @@ toggle_between_splash_and_details (state_t *state)
if (state->boot_splash != NULL)
{
ply_trace ("hiding and freeing current splash");
ply_boot_splash_hide (state->boot_splash);
hide_splash (state);
ply_boot_splash_free (state->boot_splash);
state->boot_splash = NULL;
}