From 0b39b0fc5fa9846ff350cc443b8f432efb4678ee Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 30 Aug 2018 10:06:20 -0700 Subject: [PATCH] GUACAMOLE-622: Implicitly invoke guac_terminal_start() if prompting is required. --- src/terminal/terminal.c | 3 +++ src/terminal/terminal/terminal.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index 0427ae45..95e945d8 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -943,6 +943,9 @@ char* guac_terminal_prompt(guac_terminal* terminal, const char* title, int pos; char in_byte; + /* Prompting implicitly requires user input */ + guac_terminal_start(terminal); + /* Print title */ guac_terminal_printf(terminal, "%s", title); diff --git a/src/terminal/terminal/terminal.h b/src/terminal/terminal/terminal.h index 9a0145f7..08094baa 100644 --- a/src/terminal/terminal/terminal.h +++ b/src/terminal/terminal/terminal.h @@ -652,7 +652,9 @@ void guac_terminal_notify(guac_terminal* terminal); /** * Reads a single line from this terminal's STDIN, storing the result in a * newly-allocated string. Input is retrieved in the same manner as - * guac_terminal_read_stdin() and the same restrictions apply. + * guac_terminal_read_stdin() and the same restrictions apply. As reading input + * naturally requires user interaction, this function will implicitly invoke + * guac_terminal_start(). * * @param terminal * The terminal to which the provided title should be output, and from