summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <halfline@gmail.com>2022-11-29 15:15:30 +0000
committerRay Strode <halfline@gmail.com>2022-11-29 15:15:30 +0000
commita3a63e3e30df206c7706c5011b447dac39a28ed2 (patch)
tree60ad38478827c3e9e19e39deadfd82145e01ded4
parent6b28bb622917ed3e640714b64ecdc121385913fa (diff)
parent48881ba2ef3d25fd27fd150d4d5957d4df9868e0 (diff)
Merge branch 'hide-text-early' into 'main'
src: Hide console text when splash is requested See merge request plymouth/plymouth!205
-rw-r--r--src/libply-splash-core/ply-terminal.c2
-rw-r--r--src/main.c12
2 files changed, 10 insertions, 4 deletions
diff --git a/src/libply-splash-core/ply-terminal.c b/src/libply-splash-core/ply-terminal.c
index eee23c74..1a57c6ad 100644
--- a/src/libply-splash-core/ply-terminal.c
+++ b/src/libply-splash-core/ply-terminal.c
@@ -323,6 +323,8 @@ ply_terminal_write (ply_terminal_t *terminal,
assert (terminal != NULL);
assert (format != NULL);
+ ply_terminal_set_mode (terminal, PLY_TERMINAL_MODE_TEXT);
+
string = NULL;
va_start (args, format);
size = vasprintf (&string, format, args);
diff --git a/src/main.c b/src/main.c
index ced0f743..a5de2a4a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -984,6 +984,14 @@ on_show_splash (state_t *state)
if (!state->is_attached && state->should_be_attached && has_displays)
attach_to_running_session (state);
+ if (state->local_console_terminal != NULL)
+ ply_terminal_set_mode (state->local_console_terminal, PLY_TERMINAL_MODE_GRAPHICS);
+
+#ifdef PLY_ENABLE_SYSTEMD_INTEGRATION
+ if (state->is_attached)
+ tell_systemd_to_print_details (state);
+#endif
+
if (has_displays) {
ply_trace ("at least one display already available, so loading splash");
show_splash (state);
@@ -1412,10 +1420,6 @@ on_quit (state_t *state,
state->quit_trigger = quit_trigger;
state->should_retain_splash = retain_splash;
-#ifdef PLY_ENABLE_SYSTEMD_INTEGRATION
- tell_systemd_to_stop_printing_details (state);
-#endif
-
ply_trace ("closing log");
if (state->session != NULL)
ply_terminal_session_close_log (state->session);