with the joint debugging efforts of devilhorns, efm tooltips now receive proper hiding events and don't hang around when switching desktops

SVN revision: 76853
This commit is contained in:
Mike Blumenkrantz 2012-09-19 12:16:33 +00:00
parent c9c90db86b
commit 9e9745812b
2 changed files with 2 additions and 29 deletions

View File

@ -7127,7 +7127,8 @@ _e_fm2_cb_icon_mouse_out(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
if (E_INSIDE(ev->output.x, ev->output.y - 10, ic->sd->x + ic->x - ic->sd->pos.x, ic->sd->y + ic->y - ic->sd->pos.y, ic->w, ic->h) &&
E_INSIDE(ev->output.x - 10, ev->output.y, ic->sd->x + ic->x - ic->sd->pos.x, ic->sd->y + ic->y - ic->sd->pos.y, ic->w, ic->h) &&
E_INSIDE(ev->output.x + 10, ev->output.y, ic->sd->x + ic->x - ic->sd->pos.x, ic->sd->y + ic->y - ic->sd->pos.y, ic->w, ic->h) &&
E_INSIDE(ev->output.x, ev->output.y + 10, ic->sd->x + ic->x - ic->sd->pos.x, ic->sd->y + ic->y - ic->sd->pos.y, ic->w, ic->h)) return;
E_INSIDE(ev->output.x, ev->output.y + 10, ic->sd->x + ic->x - ic->sd->pos.x, ic->sd->y + ic->y - ic->sd->pos.y, ic->w, ic->h) &&
evas_pointer_inside_get(evas_object_evas_get(ic->sd->obj))) return;
evas_object_smart_callback_call(ic->sd->obj, "icon_mouse_out", &ic->info);
}

View File

@ -43,7 +43,6 @@ struct _E_Fwin
const char *theme_file;
Ecore_Timer *popup_timer;
Ecore_Event_Handler *popup_handler;
E_Fm2_Icon_Info *popup_icon;
E_Popup *popup;
@ -725,36 +724,11 @@ _e_fwin_free(E_Fwin *fwin)
if (fwin->popup) e_object_del(E_OBJECT(fwin->popup));
if (fwin->popup_timer) ecore_timer_del(fwin->popup_timer);
fwin->popup_timer = NULL;
if (fwin->popup_handler) ecore_event_handler_del(fwin->popup_handler);
if (fwin->spring_parent) fwin->spring_parent->spring_child = NULL;
if (fwin->win) e_object_del(E_OBJECT(fwin->win));
free(fwin);
}
static Eina_Bool
_e_fwin_icon_popup_handler(void *data, int type __UNUSED__, void *event)
{
E_Fwin *fwin = data;
Ecore_Event_Mouse_IO *ev = event;
if (fwin->zone)
{
if (ev->event_window == fwin->zone->container->event_win) return ECORE_CALLBACK_RENEW;
}
else
{
if (ev->event_window == fwin->win->border->client.win) return ECORE_CALLBACK_RENEW;
}
if (fwin->popup_timer) ecore_timer_del(fwin->popup_timer);
if (fwin->popup) e_object_del(E_OBJECT(fwin->popup));
ecore_event_handler_del(fwin->popup_handler);
fwin->popup_icon = NULL;
fwin->popup_handler = NULL;
fwin->popup_timer = NULL;
fwin->popup = NULL;
return ECORE_CALLBACK_RENEW;
}
static Eina_Bool
_e_fwin_icon_popup(void *data)
{
@ -846,8 +820,6 @@ _e_fwin_icon_popup(void *data)
if (py < 0) py = 0;
e_popup_move_resize(fwin->popup, px, py, mw, mh);
evas_object_resize(bg, mw, mh);
if (!fwin->popup_handler)
fwin->popup_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_IN, _e_fwin_icon_popup_handler, fwin);
e_popup_show(fwin->popup);
return EINA_FALSE;
}