Repository: guacamole-server Updated Branches: refs/heads/master e132c7934 -> d2cb7a9ce
GUACAMOLE-630: Do not entirely reset terminal state when color scheme is changed. Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/f293c5e9 Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/f293c5e9 Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/f293c5e9 Branch: refs/heads/master Commit: f293c5e9c076d583f2f513a7673928da4395814c Parents: dcab540 Author: Michael Jumper <mjum...@apache.org> Authored: Mon Sep 24 01:28:30 2018 -0700 Committer: Michael Jumper <mjum...@apache.org> Committed: Mon Oct 22 23:23:27 2018 -0700 ---------------------------------------------------------------------- src/terminal/terminal.c | 9 +++++---- src/terminal/terminal/terminal.h | 5 ++--- 2 files changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/f293c5e9/src/terminal/terminal.c ---------------------------------------------------------------------- diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index c12df4b..1984185 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -1954,15 +1954,16 @@ void guac_terminal_apply_color_scheme(guac_terminal* terminal, display->default_palette); /* Reinitialize default attributes of buffer and display */ - terminal->buffer->default_character = *default_char; + guac_terminal_display_reset_palette(display); display->default_foreground = default_char->attributes.foreground; display->default_background = default_char->attributes.background; - /* Redraw background with new color */ + /* Redraw terminal text and background */ guac_terminal_repaint_default_layer(terminal, client->socket); + __guac_terminal_redraw_rect(terminal, 0, 0, + terminal->term_height - 1, + terminal->term_width - 1); - /* Force reset of terminal state */ - guac_terminal_reset(terminal); guac_terminal_notify(terminal); } http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/f293c5e9/src/terminal/terminal/terminal.h ---------------------------------------------------------------------- diff --git a/src/terminal/terminal/terminal.h b/src/terminal/terminal/terminal.h index 6de984b..28085f6 100644 --- a/src/terminal/terminal/terminal.h +++ b/src/terminal/terminal/terminal.h @@ -1074,9 +1074,8 @@ int guac_terminal_available_scroll(guac_terminal* term); /** * Immediately applies the given color scheme to the given terminal, overriding - * the color scheme provided when the terminal was created. Applying the color - * scheme implicitly clears the display and resets the terminal state. Valid - * color schemes are those accepted by guac_terminal_parse_color_scheme(). + * the color scheme provided when the terminal was created. Valid color schemes + * are those accepted by guac_terminal_parse_color_scheme(). * * @param terminal * The terminal to apply the color scheme to.