From 95810fbb7688e48a7443c11efec4ec378615b0a5 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 3 May 2013 12:10:38 -0700 Subject: [PATCH] Clear glyph region before sending PNG. --- protocols/ssh/src/display.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/protocols/ssh/src/display.c b/protocols/ssh/src/display.c index d02d4d1f..3e7ddbcf 100644 --- a/protocols/ssh/src/display.c +++ b/protocols/ssh/src/display.c @@ -200,9 +200,18 @@ int __guac_terminal_get_glyph(guac_terminal_display* display, int codepoint) { g_object_unref(layout); cairo_destroy(cairo); - /* Send glyph and update filled flyphs */ + /* Clear existing glyph (if any) */ + guac_protocol_send_rect(socket, display->glyph_stroke, + location * display->char_width, 0, + display->char_width, display->char_height); + + guac_protocol_send_cfill(socket, GUAC_COMP_ROUT, display->glyph_stroke, + 0x00, 0x00, 0x00, 0xFF); + + /* Send glyph */ guac_protocol_send_png(socket, GUAC_COMP_OVER, display->glyph_stroke, location * display->char_width, 0, surface); + /* Update filled glyphs */ guac_protocol_send_rect(socket, display->filled_glyphs, location * display->char_width, 0, display->char_width, display->char_height);