# HG changeset patch # User Thinker K.F. Li # Date 1236190858 -28800 # Node ID d0f8642d3508aca06df2f938221b603ee4fe0b73 # Parent 535731374dfbb03b42993f5aa1ee5bf1edfe806a Fix bug that images are lost after hidden & expose window. - It caused by forgeting to clear paths before setting paths for clipping. diff -r 535731374dfb -r d0f8642d3508 src/redraw_man.c --- a/src/redraw_man.c Thu Mar 05 01:48:52 2009 +0800 +++ b/src/redraw_man.c Thu Mar 05 02:20:58 2009 +0800 @@ -1517,15 +1517,10 @@ static void clear_canvas(canvas_t *canvas) { cairo_operator_t old_op; -#if 1 old_op = cairo_get_operator(canvas); cairo_set_operator(canvas, CAIRO_OPERATOR_CLEAR); cairo_paint(canvas); cairo_set_operator(canvas, old_op); -#else - cairo_set_source_rgba(canvas, 0, 0, 0, 0); - cairo_paint(canvas); -#endif } static void clean_canvas(cairo_t *cr, co_aix w, co_aix h) { @@ -1560,6 +1555,7 @@ int i; area_t *area; + cairo_new_path(cr); for(i = 0; i < n_dirty_areas; i++) { area = dirty_areas[i]; cairo_rectangle(cr, area->x, area->y, area->w, area->h);