# HG changeset patch # User Thinker K.F. Li # Date 1277910942 -28800 # Node ID d416e1fff71ad4e7aa4ab21c6ac51fa338ce459f # Parent ac942664fe86c6abaaa1cb91bc60577b3246b784 Fix bug of mbe_copy_source() of cairo. Must install pattern as source on target canvas instead of source canvas. diff -r ac942664fe86 -r d416e1fff71a include/mb_graph_engine_cairo.h --- a/include/mb_graph_engine_cairo.h Wed Jun 30 22:57:23 2010 +0800 +++ b/include/mb_graph_engine_cairo.h Wed Jun 30 23:15:42 2010 +0800 @@ -113,7 +113,7 @@ surf = cairo_get_target(src); ptn = cairo_pattern_create_for_surface(surf); - cairo_set_source(src, ptn); + cairo_set_source(dst, ptn); cairo_pattern_destroy(ptn); saved_op = cairo_get_operator(dst); cairo_set_operator(dst, CAIRO_OPERATOR_SOURCE); diff -r ac942664fe86 -r d416e1fff71a src/X_supp.c --- a/src/X_supp.c Wed Jun 30 22:57:23 2010 +0800 +++ b/src/X_supp.c Wed Jun 30 23:15:42 2010 +0800 @@ -484,6 +484,10 @@ xmb_rt->cr = mbe_create(xmb_rt->surface); xmb_rt->backend_cr = mbe_create(xmb_rt->backend_surface); + /* TODO: Remove this line. Since we use mbe_copy_source(), it + * will set source for the backend. So, this line is redundants. + * It can be removed. sourface_ptn can be removed, too. + */ mbe_set_source(xmb_rt->backend_cr, xmb_rt->surface_ptn); xmb_rt->rdman = (redraw_man_t *)malloc(sizeof(redraw_man_t));