Interrupt hiding on mouse in.

SVN revision: 32856
This commit is contained in:
Sebastian Dransfeld 2007-11-24 12:31:15 +00:00
parent 8f3a4020fa
commit 306ea57a09
1 changed files with 70 additions and 55 deletions

View File

@ -129,6 +129,8 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i
es->handlers = evas_list_append(es->handlers,
ecore_event_handler_add(E_EVENT_ZONE_EDGE_IN, _e_shelf_cb_mouse_in, es));
es->handlers = evas_list_append(es->handlers,
ecore_event_handler_add(ECORE_X_EVENT_MOUSE_IN, _e_shelf_cb_mouse_in, es));
es->handlers = evas_list_append(es->handlers,
ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT, _e_shelf_cb_mouse_out, es));
@ -1212,12 +1214,18 @@ _e_shelf_cb_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_inf
static int
_e_shelf_cb_mouse_in(void *data, int type, void *event)
{
E_Event_Zone_Edge_In *ev;
E_Shelf *es;
es = data;
edje_object_signal_emit(es->o_base, "e,state,focused", "e");
if (es->cfg->autohide_show_action) return 1;
if (type == E_EVENT_ZONE_EDGE_IN)
{
E_Event_Zone_Edge_In *ev;
int show = 0;
ev = event;
es = data;
switch (es->gadcon->orient)
{
case E_GADCON_ORIENT_LEFT:
@ -1268,10 +1276,17 @@ _e_shelf_cb_mouse_in(void *data, int type, void *event)
break;
}
if (show)
if (show) e_shelf_toggle(es, 1);
}
else if (type == ECORE_X_EVENT_MOUSE_IN)
{
edje_object_signal_emit(es->o_base, "e,state,focused", "e");
if (!es->cfg->autohide_show_action) e_shelf_toggle(es, 1);
Ecore_X_Event_Mouse_In *ev;
ev = event;
/* If we are about to hide the shelf, interrupt on mouse in */
if ((ev->win == es->win) &&
((es->hide_animator) || (es->instant_timer)))
e_shelf_toggle(es, 1);
}
return 1;
}