Mercurial > MadButterfly
changeset 32:69c8e264890d
Remove old path after every shape checking for a position.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 05 Aug 2008 18:28:50 +0800 |
parents | da770188a44d |
children | d82749f77108 |
files | src/X_main.c src/event.c |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/X_main.c Tue Aug 05 16:38:04 2008 +0800 +++ b/src/X_main.c Tue Aug 05 18:28:50 2008 +0800 @@ -24,7 +24,6 @@ shape->stroke_width += 2; rdman_shape_changed(rdman, shape); rdman_redraw_changed(rdman); - XFlush(display); } } last_shape = shape;
--- a/src/event.c Tue Aug 05 16:38:04 2008 +0800 +++ b/src/event.c Tue Aug 05 18:28:50 2008 +0800 @@ -98,17 +98,18 @@ if(shape->fill) { if(cairo_in_fill(cr, x, y)) { *in_stroke = 0; - cairo_new_path(cr); + cairo_new_path(rdman->cr); return geo; } } if(shape->stroke) { if(cairo_in_stroke(cr, x, y)) { *in_stroke = 1; - cairo_new_path(cr); + cairo_new_path(rdman->cr); return geo; } } + cairo_new_path(rdman->cr); } return NULL;