Revert "Remove cursor layer."
This reverts commit 16a77db63bcc1455b2ec3b9939f50a70b7e03c21.
This commit is contained in:
parent
436387edae
commit
f1844ec555
@ -320,6 +320,11 @@ struct guac_terminal {
|
||||
*/
|
||||
int cursor_col;
|
||||
|
||||
/**
|
||||
* Simple cursor layer until scrollback, etc. is implemented.
|
||||
*/
|
||||
guac_layer* cursor_layer;
|
||||
|
||||
/**
|
||||
* The attributes which will be applied to future characters.
|
||||
*/
|
||||
|
@ -122,6 +122,17 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
||||
term->char_width * term->term_width,
|
||||
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, term->cursor_layer,
|
||||
0, 0, term->char_width, term->char_height);
|
||||
|
||||
guac_protocol_send_cfill(socket,
|
||||
GUAC_COMP_OVER, term->cursor_layer,
|
||||
0x40, 0xFF, 0x80, 0x80);
|
||||
|
||||
guac_socket_flush(socket);
|
||||
|
||||
/* Open SSH session */
|
||||
|
@ -134,6 +134,7 @@ guac_terminal* guac_terminal_create(guac_client* client,
|
||||
|
||||
term->cursor_row = 0;
|
||||
term->cursor_col = 0;
|
||||
term->cursor_layer = guac_client_alloc_layer(client);
|
||||
|
||||
term->term_width = width / term->char_width;
|
||||
term->term_height = height / term->char_height;
|
||||
|
Loading…
Reference in New Issue
Block a user