[goocanvas/new-api] 2010-07-01 Damon Chaplin <damon gnome org>



commit 9543cbcc944ada8f99eb772a3b4714307046414f
Author: Damon Chaplin <damon gnome org>
Date:   Sat Jul 3 11:34:10 2010 +0100

    2010-07-01  Damon Chaplin  <damon gnome org>
    
    	    * src/goocanvasitemsimple.c (goo_canvas_item_simple_get_items_at):
    	    make the clip-path only affect the item itself, not the children,
    	    since that is what we currently do in paint() and update().
    	    Clipping the children may be better but it is slightly awkward due
    	    to all the coordinate conversions/hacks etc.

 ChangeLog                 |    8 ++++++++
 src/goocanvasitemsimple.c |    9 +++------
 2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ef8a155..dd77926 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-07-01  Damon Chaplin  <damon gnome org>
+
+	* src/goocanvasitemsimple.c (goo_canvas_item_simple_get_items_at):
+	make the clip-path only affect the item itself, not the children,
+	since that is what we currently do in paint() and update().
+	Clipping the children may be better but it is slightly awkward due
+	to all the coordinate conversions/hacks etc.
+
 2010-06-30  Damon Chaplin  <damon gnome org>
 
 	* src/goocanvas.c (goo_canvas_expose_event): do a cairo_save()/restore()
diff --git a/src/goocanvasitemsimple.c b/src/goocanvasitemsimple.c
index 1fa3a78..4279ee0 100644
--- a/src/goocanvasitemsimple.c
+++ b/src/goocanvasitemsimple.c
@@ -639,7 +639,7 @@ goo_canvas_item_simple_get_items_at (GooCanvasItem  *item,
   GooCanvasItemSimple *simple = (GooCanvasItemSimple*) item;
   double user_x = x, user_y = y, old_x0, old_y0;
   cairo_matrix_t matrix;
-  gboolean visible = parent_visible;
+  gboolean visible = parent_visible, check_item = TRUE;
   gint i;
 
   if (simple->need_update)
@@ -681,13 +681,10 @@ goo_canvas_item_simple_get_items_at (GooCanvasItem  *item,
       goo_canvas_create_path (simple->clip_path_commands, cr);
       cairo_set_fill_rule (cr, simple->clip_fill_rule);
       if (!cairo_in_fill (cr, user_x, user_y))
-	{
-	  cairo_restore (cr);
-	  return found_items;
-	}
+	check_item = FALSE;
     }
 
-  if (class->simple_is_item_at (simple, user_x, user_y, cr, is_pointer_event))
+  if (check_item && class->simple_is_item_at (simple, user_x, user_y, cr, is_pointer_event))
     found_items = g_list_prepend (found_items, item);
 
   /* Step up from the bottom of the children to the top, adding any items



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]