Partial implementation of flush (set only).

This commit is contained in:
Michael Jumper 2013-03-24 18:46:47 -07:00
parent 3e21d1c3c7
commit 1408248282
2 changed files with 27 additions and 1 deletions

View File

@ -104,6 +104,8 @@ int ssh_guac_client_handle_messages(guac_client* client) {
} }
} }
/* Flush terminal delta */
guac_terminal_delta_flush(client_data->term->delta, client_data->term);
return 0; return 0;
} }

View File

@ -585,6 +585,30 @@ void guac_terminal_delta_set_rect(guac_terminal_delta* delta,
void guac_terminal_delta_flush(guac_terminal_delta* delta, void guac_terminal_delta_flush(guac_terminal_delta* delta,
guac_terminal* terminal) { guac_terminal* terminal) {
/* STUB */
guac_terminal_operation* current = delta->operations;
int row, col;
/* For each operation */
for (row=0; row<delta->height; row++) {
for (col=0; col<delta->width; col++) {
/* Perform given operation */
if (current->type == GUAC_CHAR_SET) {
__guac_terminal_set(terminal, row, col,
current->character.value);
/* Mark operation as handled */
current->type = GUAC_CHAR_NOP;
}
/* Next operation */
current++;
}
}
} }