Mercurial > MadButterfly
diff src/redraw_man.c @ 317:d0f8642d3508
Fix bug that images are lost after hidden & expose window.
- It caused by forgeting to clear paths before setting paths for
clipping.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 05 Mar 2009 02:20:58 +0800 |
parents | 6c350fc92ae3 |
children | c1afd14caa85 |
line wrap: on
line diff
--- 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);