hide tw popups on mouse up/down

fix T1290
This commit is contained in:
Mike Blumenkrantz 2014-07-03 11:01:28 -04:00
parent 82b813d915
commit 814507c1d4
1 changed files with 9 additions and 0 deletions

View File

@ -1126,6 +1126,13 @@ tw_handler_hide(void)
tw_mod->force = 0;
}
static Eina_Bool
button_press(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev EINA_UNUSED)
{
if (tw_mod->pop) tw_handler_hide();
return ECORE_CALLBACK_RENEW;
}
static Eina_Bool
desk_show(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Desk_Show *ev EINA_UNUSED)
{
@ -1213,6 +1220,8 @@ e_tw_init(void)
E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_DATA, download_media_data, tw_mod);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_FOCUS_OUT, focus_out, tw_mod);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_DESK_SHOW, desk_show, tw_mod);
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN, button_press, tw_mod);
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_BUTTON_UP, button_press, tw_mod);
tw_mod->media = eina_hash_string_superfast_new((Eina_Free_Cb)download_media_free);
return 1;