GUACAMOLE-1256: Workaround for the terminal scroll down issue.
This commit is contained in:
parent
97cd8d635b
commit
8aa2173c38
@ -859,14 +859,20 @@ void __guac_terminal_display_flush_set(guac_terminal_display* display) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void guac_terminal_display_flush(guac_terminal_display* display) {
|
||||
void guac_terminal_display_flush_operations(guac_terminal_display* display) {
|
||||
|
||||
/* Flush operations, copies first, then clears, then sets. */
|
||||
__guac_terminal_display_flush_copy(display);
|
||||
__guac_terminal_display_flush_clear(display);
|
||||
__guac_terminal_display_flush_set(display);
|
||||
|
||||
}
|
||||
|
||||
void guac_terminal_display_flush(guac_terminal_display* display) {
|
||||
|
||||
/* Flush operations */
|
||||
guac_terminal_display_flush_operations(display);
|
||||
|
||||
/* Flush surface */
|
||||
guac_common_surface_flush(display->display_surface);
|
||||
|
||||
|
||||
@ -868,6 +868,15 @@ void guac_terminal_scroll_up(guac_terminal* term,
|
||||
void guac_terminal_scroll_down(guac_terminal* term,
|
||||
int start_row, int end_row, int amount) {
|
||||
|
||||
/*
|
||||
* We must flush all pending operations here because
|
||||
* guac_terminal_copy_rows will set new GUAC_CHAR_COPY for
|
||||
* cells of shifted rows meanwhile preceding GUAC_CHAR_SET for these cells
|
||||
* are not actually done yet. The GUAC_CHAR_COPY operation has the highest
|
||||
* priority, so if we do not 'flush' here, wrong content will be copied.
|
||||
*/
|
||||
guac_terminal_display_flush_operations(term->display);
|
||||
|
||||
guac_terminal_copy_rows(term, start_row, end_row - amount, amount);
|
||||
|
||||
/* Clear new area */
|
||||
|
||||
@ -318,6 +318,18 @@ void guac_terminal_display_resize(guac_terminal_display* display, int width, int
|
||||
|
||||
/**
|
||||
* Flushes all pending operations within the given guac_terminal_display.
|
||||
*
|
||||
* @param display
|
||||
* The terminal display whose pending operations are being flushed.
|
||||
*/
|
||||
void guac_terminal_display_flush_operations(guac_terminal_display* display);
|
||||
|
||||
/**
|
||||
* Flushes all pending operations within the given guac_terminal_display,
|
||||
* then flushes the display surface.
|
||||
*
|
||||
* @param display
|
||||
* The terminal display to flush.
|
||||
*/
|
||||
void guac_terminal_display_flush(guac_terminal_display* display);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user