mawww commented on a change in pull request #237: GUACAMOLE-871: Add support
for hidden cursor (DECTECM)
URL: https://github.com/apache/guacamole-server/pull/237#discussion_r335219916
##########
File path: src/terminal/terminal.c
##########
@@ -777,31 +778,42 @@ void guac_terminal_commit_cursor(guac_terminal* term) {
guac_terminal_char* guac_char;
- guac_terminal_buffer_row* old_row;
- guac_terminal_buffer_row* new_row;
+ guac_terminal_buffer_row* row;
/* If no change, done */
- if (term->visible_cursor_row == term->cursor_row &&
term->visible_cursor_col == term->cursor_col)
+ if (term->cursor_visible && term->visible_cursor_row == term->cursor_row
&& term->visible_cursor_col == term->cursor_col)
Review comment:
If `cursor_visible == false` we will clear only if `visible_cursor_col != -1
&& visible_cursor_row != -1`, then we will unconditionally set those to `-1`
which might be redundant but should not be an issue (if we are counting CPU
cycles, I dont expect setting those to -1 vs checking if they already are to
early out to be noticeably different).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services