From: Ingo Bürk Date: Sun, 15 Nov 2015 16:25:12 +0000 (+0100) Subject: Fix draw_util_copy_surface. X-Git-Tag: 4.12~97^2~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d9bbfb7b351f13a3a86e43f69fc7d2e4a18582f4;p=i3%2Fi3 Fix draw_util_copy_surface. This patch fixes a bug when copying one surface to another. Since it only exposes itself when used with non-trivial source coordinates, it didn't surface before when only used for i3bar. relates to #1278 --- diff --git a/libi3/draw_util.c b/libi3/draw_util.c index 04dc0ce5..90b1f26f 100644 --- a/libi3/draw_util.c +++ b/libi3/draw_util.c @@ -186,7 +186,7 @@ void draw_util_copy_surface(surface_t *src, surface_t *dest, double src_x, doubl * onto the surface rather than blending it. This is a bit more efficient and * allows better color control for the user when using opacity. */ cairo_set_operator(dest->cr, CAIRO_OPERATOR_SOURCE); - cairo_set_source_surface(dest->cr, src->surface, dest_x - src_x, src_y); + cairo_set_source_surface(dest->cr, src->surface, dest_x - src_x, dest_y - src_y); cairo_rectangle(dest->cr, dest_x, dest_y, width, height); cairo_fill(dest->cr);