]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
seat: make sure to open terminal when adding text displays
authorRay Strode <rstrode@redhat.com>
Thu, 6 Mar 2014 19:42:16 +0000 (14:42 -0500)
committerRay Strode <rstrode@redhat.com>
Thu, 6 Mar 2014 19:42:16 +0000 (14:42 -0500)
If we have a pixel display, the renderer will handle opening the
associated terminal. but if we don't have a pixel display, something
needs to open the terminal.

This commit adds code to do that.

src/libply-splash-core/ply-seat.c

index 541b29e643b609c1cc44cb3bf01c04f9bcb04060..2ac8bf762fab91fc9077a3644e4380c33438f2b3 100644 (file)
@@ -102,6 +102,19 @@ add_text_displays (ply_seat_t *seat)
 {
   ply_text_display_t *display;
 
+  if (!ply_terminal_is_open (seat->terminal))
+    {
+      if (!ply_terminal_open (seat->terminal))
+        {
+          ply_trace ("could not add terminal %s: %m",
+                     ply_terminal_get_name (seat->terminal));
+          return;
+        }
+    }
+
+  ply_trace ("adding text display for terminal %s",
+             ply_terminal_get_name (seat->terminal));
+
   display = ply_text_display_new (seat->terminal);
   ply_list_append_data (seat->text_displays, display);
 }