]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[terminal,text,details] move activate vt into plugins
authorScott James Remnant <scott@ubuntu.com>
Thu, 18 Mar 2010 04:56:24 +0000 (04:56 +0000)
committerScott James Remnant <scott@ubuntu.com>
Thu, 18 Mar 2010 20:01:31 +0000 (20:01 +0000)
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
src/plugins/splash/details/plugin.c
src/plugins/splash/text/plugin.c

index 7c67c76d6b4e9af6b6176bb8499f34fb2bbd5e93..429d8c521ec9e00e8fc25d5bd86d98a9bbdac070 100644 (file)
@@ -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);
 
index d6980cf03fd6e0aa091d01ec827a92bfcc944c6d..05eddc61f78d15bea6cba56ebd0d80b54a6dfcf9 100644 (file)
@@ -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);
 }
index 228e27101ffdfe28bba4d2b2099097948d0363f6..690f54b3d754b610a1a1124a1d32231c1a68f076 100644 (file)
@@ -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)