From: <enl...@li...> - 2002-03-17 22:08:35
|
Enlightenment CVS committal Author : tillsan Project : e17 Module : apps/e Dir : e17/apps/e/src Modified Files: menu.c Log Message: patch by Ibukun Olumuyiwa <ib...@co...>. 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. =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/menu.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- menu.c 11 Mar 2002 20:03:14 -0000 1.32 +++ menu.c 17 Mar 2002 22:08:33 -0000 1.33 @@ -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 @@ * 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); |