static bool attach_to_running_session (state_t *state);
static void on_escape_pressed (state_t *state);
-static void dump_details_and_quit_splash (state_t *state);
+static void dump_details (state_t *state);
+static void quit_splash (state_t *state,
+ bool should_retain_vt);
static void update_display (state_t *state);
static void on_error_message (ply_buffer_t *debug_buffer,
if (plymouth_should_ignore_show_splash_calls (state))
{
+ const bool should_retain_vt = false;
+
ply_trace ("show splash called while ignoring show splash calls");
- dump_details_and_quit_splash (state);
+ dump_details (state);
+ quit_splash (state, should_retain_vt);
return;
}
}
static void
-quit_splash (state_t *state)
+quit_splash (state_t *state,
+ bool should_retain_vt)
{
ply_trace ("quiting splash");
if (state->boot_splash != NULL)
if (state->terminal != NULL)
{
- if (!state->should_retain_splash)
+ if (!should_retain_vt)
{
ply_trace ("Not retaining splash, so deallocating VT");
ply_terminal_deactivate_vt (state->terminal);
}
static void
-dump_details_and_quit_splash (state_t *state)
+dump_details (state_t *state)
{
state->showing_details = false;
toggle_between_splash_and_details (state);
ply_renderer_deactivate (state->renderer);
if (state->boot_splash != NULL)
ply_boot_splash_hide (state->boot_splash);
-
- quit_splash (state);
}
static void
on_hide_splash (state_t *state)
{
+ const bool should_retain_vt = true;
+
if (state->is_inactive)
return;
return;
ply_trace ("hiding boot splash");
- dump_details_and_quit_splash (state);
+ dump_details (state);
+ quit_splash (state, should_retain_vt);
}
#ifdef PLY_ENABLE_GDM_TRANSITION
*/
if (state->quit_trigger != NULL)
{
+ bool should_retain_vt;
+
if (!state->should_retain_splash)
{
ply_trace ("hiding splash");
ply_renderer_deactivate (state->renderer);
if (state->boot_splash != NULL)
ply_boot_splash_hide (state->boot_splash);
+
+ should_retain_vt = false;
+ }
+ else
+ {
+ should_retain_vt = true;
}
ply_trace ("quitting splash");
- quit_splash (state);
+ quit_splash (state, should_retain_vt);
ply_trace ("quitting program");
quit_program (state);
}
bool retain_splash,
ply_trigger_t *quit_trigger)
{
+ bool should_retain_vt = false;
+
if (state->quit_trigger != NULL)
{
ply_trigger_add_handler (state->quit_trigger,
state->quit_trigger = quit_trigger;
state->should_retain_splash = retain_splash;
+ if (state->should_retain_splash)
+ {
+ should_retain_vt = true;
+ }
+
ply_trace ("time to quit, closing log");
if (state->session != NULL)
ply_terminal_session_close_log (state->session);
{
/* We've been deactivated and X failed to start
*/
- dump_details_and_quit_splash (state);
+ dump_details (state);
+ quit_splash (state, should_retain_vt);
quit_program (state);
}
else if (state->boot_splash != NULL)