Flush cairo surface after drawing text.
This is necessary to avoid a bug where a cairo assertion fails because no snapshot is available. fixes #1989
This commit is contained in:
@ -133,6 +133,8 @@ static void draw_text_pango(const char *text, size_t text_len,
|
||||
cairo_move_to(cr, x, y - yoffset);
|
||||
pango_cairo_show_layout(cr, layout);
|
||||
|
||||
cairo_surface_flush(surface);
|
||||
|
||||
/* Free resources */
|
||||
g_object_unref(layout);
|
||||
cairo_destroy(cr);
|
||||
|
Reference in New Issue
Block a user