Introduce a macro to flush a cairo surface twice.

Flushing the surface twice is necessary due to a cairo bug. For context,
refer to #1989 and https://bugs.freedesktop.org/show_bug.cgi?id=92455.
This commit is contained in:
Ingo Bürk
2015-10-14 18:57:16 +02:00
parent 54dbbe2f06
commit 8178910f16
4 changed files with 17 additions and 6 deletions

View File

@ -248,7 +248,7 @@ void refresh_statusline(bool use_short_text) {
cairo_set_source_color(&statusline_surface, colors.bar_bg);
cairo_set_operator(statusline_surface.cr, CAIRO_OPERATOR_SOURCE);
cairo_paint(statusline_surface.cr);
cairo_surface_flush(statusline_surface.surface);
CAIRO_SURFACE_FLUSH(statusline_surface.surface);
cairo_restore(statusline_surface.cr);
/* Draw the text of each block. */
@ -1801,7 +1801,7 @@ void draw_bars(bool unhide) {
cairo_set_source_color(&(outputs_walk->buffer), colors.bar_bg);
cairo_set_operator(outputs_walk->buffer.cr, CAIRO_OPERATOR_SOURCE);
cairo_paint(outputs_walk->buffer.cr);
cairo_surface_flush(outputs_walk->buffer.surface);
CAIRO_SURFACE_FLUSH(outputs_walk->buffer.surface);
cairo_restore(outputs_walk->buffer.cr);
if (!config.disable_ws) {