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
This commit is contained in:
Ingo Bürk 2015-11-15 17:25:12 +01:00
parent 90d94298fa
commit d9bbfb7b35
1 changed files with 1 additions and 1 deletions

View File

@ -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);