From d9bbfb7b351f13a3a86e43f69fc7d2e4a18582f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20B=C3=BCrk?= Date: Sun, 15 Nov 2015 17:25:12 +0100 Subject: [PATCH] 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 --- libi3/draw_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);