From ca0db777ccc2fe277edb2f534cb37e93d5febb2d Mon Sep 17 00:00:00 2001 From: Till Adam Date: Sun, 17 Mar 2002 22:08:33 +0000 Subject: [PATCH] patch by Ibukun Olumuyiwa . Thanks dude. :) -- Intersect area for mouse clicks did not cover the entire menu item. Fixed to use the full dimensions of the menu item evas object instead. SVN revision: 6072 --- src/menu.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/menu.c b/src/menu.c index b061f67cc..90daaf687 100644 --- a/src/menu.c +++ b/src/menu.c @@ -2,6 +2,7 @@ #include "menu.h" #include "config.h" #include "util.h" +#include "math.h" static Evas_List open_menus = NULL; /* List of all open menus */ static Evas_List menus = NULL; @@ -394,11 +395,16 @@ e_mouse_up(Ecore_Event * ev) * that the mouse pointer really is over it: */ if (m->selected) { - if (INTERSECTS(m->selected->x + m->current.x, - m->selected->y + m->current.y, - m->selected->size.w, - m->selected->size.h + - m->sel_border.b, mouse_x, mouse_y, 0, + /* Get the dimensions of the selection for use in + * the test */ + double s_x, s_y, s_w, s_h; + evas_get_geometry(m->evas, m->selected->obj_entry, + &s_x, &s_y, &s_w, &s_h); + if (INTERSECTS(m->current.x + rint(s_x), + m->current.y + rint(s_y), + rint(s_w), + rint(s_h), + mouse_x, mouse_y, 0, 0)) { e_menu_callback_item(m, m->selected);