patch by Ibukun Olumuyiwa <ibukun@computer.org>. 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
This commit is contained in:
Till Adam 2002-03-17 22:08:33 +00:00
parent ae9634250b
commit ca0db777cc
1 changed files with 11 additions and 5 deletions

View File

@ -2,6 +2,7 @@
#include "menu.h" #include "menu.h"
#include "config.h" #include "config.h"
#include "util.h" #include "util.h"
#include "math.h"
static Evas_List open_menus = NULL; /* List of all open menus */ static Evas_List open_menus = NULL; /* List of all open menus */
static Evas_List menus = NULL; static Evas_List menus = NULL;
@ -394,11 +395,16 @@ e_mouse_up(Ecore_Event * ev)
* that the mouse pointer really is over it: */ * that the mouse pointer really is over it: */
if (m->selected) if (m->selected)
{ {
if (INTERSECTS(m->selected->x + m->current.x, /* Get the dimensions of the selection for use in
m->selected->y + m->current.y, * the test */
m->selected->size.w, double s_x, s_y, s_w, s_h;
m->selected->size.h + evas_get_geometry(m->evas, m->selected->obj_entry,
m->sel_border.b, mouse_x, mouse_y, 0, &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)) 0))
{ {
e_menu_callback_item(m, m->selected); e_menu_callback_item(m, m->selected);