[PATCH 15/21] [terminal,text,details] move activate vt into plugins

Scott James Remnant scott at ubuntu.com
Wed Mar 17 21:56:24 PDT 2010


Move the responsiblity to activate the VT into the text and details
plugins; this not only matches the graphical renderers, but it also
ensures we activate the VT in all possible code paths.

Previously if we fell back to text.so because we couldn't activate
a renderer, this would not activate the VT.
---
 src/main.c                          |    2 --
 src/plugins/splash/details/plugin.c |    3 ++-
 src/plugins/splash/text/plugin.c    |    3 ++-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main.c b/src/main.c
index 7c67c76..429d8c5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1011,8 +1011,6 @@ add_display_and_keyboard_for_terminal (state_t    *state,
 
   state->terminal = ply_terminal_new (tty_name);
 
-  ply_terminal_activate_vt (state->terminal);
-
   keyboard = ply_keyboard_new_for_terminal (state->terminal);
   display = ply_text_display_new (state->terminal);
 
diff --git a/src/plugins/splash/details/plugin.c b/src/plugins/splash/details/plugin.c
index d6980cf..05eddc6 100644
--- a/src/plugins/splash/details/plugin.c
+++ b/src/plugins/splash/details/plugin.c
@@ -202,7 +202,8 @@ add_text_display (ply_boot_splash_plugin_t *plugin,
   view = view_new (plugin, display);
 
   terminal = ply_text_display_get_terminal (view->display);
-  ply_terminal_open (terminal);
+  if (ply_terminal_open (terminal))
+    ply_terminal_activate_vt (terminal);
 
   ply_list_append_data (plugin->views, view);
 }
diff --git a/src/plugins/splash/text/plugin.c b/src/plugins/splash/text/plugin.c
index 228e271..690f54b 100644
--- a/src/plugins/splash/text/plugin.c
+++ b/src/plugins/splash/text/plugin.c
@@ -484,7 +484,8 @@ add_text_display (ply_boot_splash_plugin_t *plugin,
   view = view_new (plugin, display);
 
   terminal = ply_text_display_get_terminal (view->display);
-  ply_terminal_open (terminal);
+  if (ply_terminal_open (terminal))
+    ply_terminal_activate_vt (terminal);
 
   ply_text_display_set_draw_handler (view->display,
                                      (ply_text_display_draw_handler_t)
-- 
1.7.0



More information about the plymouth mailing list