Restore cursor redraw function.

This commit is contained in:
Michael Jumper 2013-03-27 04:11:56 -07:00
parent f1844ec555
commit c2e80bda81
3 changed files with 24 additions and 0 deletions

View File

@ -451,5 +451,10 @@ void guac_terminal_display_set_rect(guac_terminal_display* display,
void guac_terminal_display_flush(guac_terminal_display* display, void guac_terminal_display_flush(guac_terminal_display* display,
guac_terminal* terminal); guac_terminal* terminal);
/**
* Update the cursor position and contents.
*/
int guac_terminal_redraw_cursor(guac_terminal* term);
#endif #endif

View File

@ -106,6 +106,10 @@ int ssh_guac_client_handle_messages(guac_client* client) {
/* Flush terminal display */ /* Flush terminal display */
guac_terminal_display_flush(client_data->term->display, client_data->term); guac_terminal_display_flush(client_data->term->display, client_data->term);
/* Update cursor */
guac_terminal_redraw_cursor(client_data->term);
return 0; return 0;
} }

View File

@ -987,3 +987,18 @@ void guac_terminal_display_flush(guac_terminal_display* display,
} }
int guac_terminal_redraw_cursor(guac_terminal* term) {
guac_socket* socket = term->client->socket;
/* Erase old cursor */
return
guac_protocol_send_move(socket,
term->cursor_layer,
GUAC_DEFAULT_LAYER,
term->char_width * term->cursor_col,
term->char_height * term->cursor_row,
1);
}