Move cursor layer rather than redraw.
This commit is contained in:
parent
cdae593fc5
commit
19564cd133
@ -124,6 +124,16 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
|||||||
term->char_width * term->term_width,
|
term->char_width * term->term_width,
|
||||||
term->char_height * term->term_height);
|
term->char_height * term->term_height);
|
||||||
|
|
||||||
|
/* Cursor layer need only be one char */
|
||||||
|
guac_protocol_send_size(socket, term->cursor_layer, term->char_width, term->char_height);
|
||||||
|
|
||||||
|
/* Draw cursor */
|
||||||
|
guac_protocol_send_rect(socket,
|
||||||
|
GUAC_COMP_OVER, term->cursor_layer,
|
||||||
|
0, 0, term->char_width, term->char_height,
|
||||||
|
0x40, 0xFF, 0x80,
|
||||||
|
0x80);
|
||||||
|
|
||||||
guac_socket_flush(socket);
|
guac_socket_flush(socket);
|
||||||
|
|
||||||
/* Open SSH session */
|
/* Open SSH session */
|
||||||
|
@ -253,24 +253,13 @@ int ssh_guac_terminal_redraw_cursor(ssh_guac_terminal* term) {
|
|||||||
|
|
||||||
/* Erase old cursor */
|
/* Erase old cursor */
|
||||||
return
|
return
|
||||||
guac_protocol_send_rect(socket,
|
guac_protocol_send_move(socket,
|
||||||
GUAC_COMP_ROUT, term->cursor_layer,
|
term->cursor_layer,
|
||||||
|
|
||||||
0, 0,
|
|
||||||
term->char_width * term->term_width,
|
|
||||||
term->char_height * term->term_height,
|
|
||||||
|
|
||||||
0, 0, 0, 0xFF)
|
|
||||||
|
|
||||||
|| guac_protocol_send_rect(socket,
|
|
||||||
GUAC_COMP_OVER, term->cursor_layer,
|
|
||||||
|
|
||||||
|
GUAC_DEFAULT_LAYER,
|
||||||
term->char_width * term->cursor_col,
|
term->char_width * term->cursor_col,
|
||||||
term->char_height * term->cursor_row,
|
term->char_height * term->cursor_row,
|
||||||
term->char_width, term->char_height,
|
1);
|
||||||
|
|
||||||
0x40, 0xFF, 0x80,
|
|
||||||
0x80);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user