GUACAMOLE-630: Do not entirely reset terminal state when color scheme is changed.

This commit is contained in:
Michael Jumper 2018-09-24 01:28:30 -07:00
parent dcab540839
commit f293c5e9c0
2 changed files with 7 additions and 7 deletions

View File

@ -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);
}

View File

@ -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.