# HG changeset patch # User Thinker K.F. Li # Date 1217932130 -28800 # Node ID 69c8e264890db7c151e179b8f79482c493bd2955 # Parent da770188a44d5253dd17107f7480333bbff067fd Remove old path after every shape checking for a position. diff -r da770188a44d -r 69c8e264890d src/X_main.c --- 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; diff -r da770188a44d -r 69c8e264890d src/event.c --- 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;