From b3a95d0299386bccbdebb967d15f4df02cf15891 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 10 Oct 2010 02:31:45 +0200 Subject: gnome-canvas: Change GnomeCanvasItem->point vfunc Previously the function returned the distance to the nearest item. Now it only returns an item that is hit. This slightly changes semantics (button events are no longer dispatched to the nearest item, but only to the item actually clicked on), but makes the code way simpler and actually does what one would expect. --- calendar/gui/e-day-view-top-item.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index c0b718d63b..41a2b665df 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -781,21 +781,14 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item, cairo_destroy (cr); } -static double +static GnomeCanvasItem * day_view_top_item_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, - gint cy, - GnomeCanvasItem **actual_item) + gint cy) { - /* This is supposed to return the nearest item the the point - * and the distance. Since we are the only item we just return - * ourself and 0 for the distance. This is needed so that we - * get button/motion events. */ - *actual_item = item; - - return 0.0; + return item; } static void -- cgit v1.2.3