From 0057460c44129a490bcac4affc1e017179d78730 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 18 May 2013 22:24:09 -0700 Subject: [PATCH] Add echo flag. --- protocols/ssh/include/terminal.h | 8 ++++++++ protocols/ssh/src/terminal.c | 1 + 2 files changed, 9 insertions(+) diff --git a/protocols/ssh/include/terminal.h b/protocols/ssh/include/terminal.h index a99582d9..d9ecd1fb 100644 --- a/protocols/ssh/include/terminal.h +++ b/protocols/ssh/include/terminal.h @@ -75,6 +75,14 @@ struct guac_terminal { */ pthread_mutex_t lock; + /** + * Whether input should be echoed when keys are pressed. Normally, the + * terminal on the side of the SSH server will handle this automatically, + * and this flag will need to be cleared. When SSH is not yet connected, + * this flag would need to be set for input to be visible. + */ + bool echo; + /** * The relative offset of the display. A positive value indicates that * many rows have been scrolled into view, zero indicates that no diff --git a/protocols/ssh/src/terminal.c b/protocols/ssh/src/terminal.c index 601b60a0..af2533e0 100644 --- a/protocols/ssh/src/terminal.c +++ b/protocols/ssh/src/terminal.c @@ -94,6 +94,7 @@ guac_terminal* guac_terminal_create(guac_client* client, term->scroll_end = term->term_height - 1; term->text_selected = false; + term->echo = true; /* Size display */ guac_terminal_display_resize(term->display,