bring back the fwin event handlers and add more handlers to fix tooltip hiding when dragging gadgets over files

SVN revision: 76934
This commit is contained in:
Mike Blumenkrantz 2012-09-21 07:34:11 +00:00
parent 6f79521d41
commit 8d97adf900
1 changed files with 34 additions and 0 deletions

View File

@ -43,6 +43,7 @@ struct _E_Fwin
const char *theme_file;
Ecore_Timer *popup_timer;
Eina_List *popup_handlers;
E_Fm2_Icon_Info *popup_icon;
E_Popup *popup;
@ -724,11 +725,38 @@ _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;
E_FREE_LIST(fwin->popup_handlers, ecore_event_handler_del);
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, void *event)
{
E_Fwin *fwin = data;
Ecore_Event_Mouse_IO *ev = event;
if (type == ECORE_X_EVENT_MOUSE_IN)
{
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));
E_FREE_LIST(fwin->popup_handlers, ecore_event_handler_del);
fwin->popup_icon = NULL;
fwin->popup_timer = NULL;
fwin->popup = NULL;
return ECORE_CALLBACK_RENEW;
}
static Eina_Bool
_e_fwin_icon_popup(void *data)
{
@ -820,6 +848,12 @@ _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_handlers)
{
E_LIST_HANDLERS_APPEND(fwin->popup_handlers, ECORE_X_EVENT_MOUSE_IN, _e_fwin_icon_popup_handler, fwin);
E_LIST_HANDLERS_APPEND(fwin->popup_handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_fwin_icon_popup_handler, fwin);
E_LIST_HANDLERS_APPEND(fwin->popup_handlers, ECORE_X_EVENT_MOUSE_OUT, _e_fwin_icon_popup_handler, fwin);
}
e_popup_show(fwin->popup);
return EINA_FALSE;
}