summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2014-03-06 14:42:16 -0500
committerRay Strode <rstrode@redhat.com>2014-03-06 14:42:16 -0500
commit7e594f72550d5eeb02507ade602d7f95391e77ac (patch)
treeaede82fb699d223c87e431435180f38828fad167
parent6c9fddafb1d8f5901653a824acc6974ad773af71 (diff)
seat: make sure to open terminal when adding text displays
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.
-rw-r--r--src/libply-splash-core/ply-seat.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libply-splash-core/ply-seat.c b/src/libply-splash-core/ply-seat.c
index 541b29e6..2ac8bf76 100644
--- a/src/libply-splash-core/ply-seat.c
+++ b/src/libply-splash-core/ply-seat.c
@@ -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);
}