summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <m.blumenkran@samsung.com>2013-06-17 09:13:47 +0100
committerMike Blumenkrantz <m.blumenkran@samsung.com>2013-06-17 09:13:47 +0100
commite51fa700987ca5a39133f33173f5e9438c17f34d (patch)
tree871385f61fd5d8c9d6e6e24be1fccc41aa056bcd /src
parentb76275032c0708eba3cecc7ae79e85bb453b16fe (diff)
add teamwork handler for border focus out to hide popup when not using pointer focus
Diffstat (limited to 'src')
-rw-r--r--src/modules/teamwork/e_mod_tw.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/modules/teamwork/e_mod_tw.c b/src/modules/teamwork/e_mod_tw.c
index 71cb3b13a..6b949481c 100644
--- a/src/modules/teamwork/e_mod_tw.c
+++ b/src/modules/teamwork/e_mod_tw.c
@@ -805,6 +805,22 @@ tw_show_local_file(const char *uri)
805 e_object_data_set(E_OBJECT(tw_mod->pop), eina_stringshare_add(uri)); 805 e_object_data_set(E_OBJECT(tw_mod->pop), eina_stringshare_add(uri));
806} 806}
807 807
808static Eina_Bool
809focus_out(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Border_Focus_Out *ev EINA_UNUSED)
810{
811 if (!tw_mod->pop) return ECORE_CALLBACK_RENEW;
812 if (e_config->focus_policy == E_FOCUS_CLICK) return ECORE_CALLBACK_RENEW;
813 if (tw_config->mouse_out_delay)
814 {
815 if (tw_hide_timer) ecore_timer_reset(tw_hide_timer);
816 else tw_hide_timer = ecore_timer_add(tw_config->mouse_out_delay, tw_hide, NULL);
817 }
818 else
819 tw_hide(NULL);
820 tw_mod->force = 0;
821 return ECORE_CALLBACK_RENEW;
822}
823
808EINTERN Eina_Bool 824EINTERN Eina_Bool
809tw_hide(void *d EINA_UNUSED) 825tw_hide(void *d EINA_UNUSED)
810{ 826{
@@ -843,6 +859,7 @@ e_tw_init(void)
843 E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_COMPLETE, download_media_complete, tw_mod); 859 E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_COMPLETE, download_media_complete, tw_mod);
844 E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_PROGRESS, download_media_status, tw_mod); 860 E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_PROGRESS, download_media_status, tw_mod);
845 E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_DATA, download_media_data, tw_mod); 861 E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_DATA, download_media_data, tw_mod);
862 E_LIST_HANDLER_APPEND(handlers, E_EVENT_BORDER_FOCUS_OUT, focus_out, tw_mod);
846 863
847 tw_mod->media = eina_hash_string_superfast_new((Eina_Free_Cb)download_media_free); 864 tw_mod->media = eina_hash_string_superfast_new((Eina_Free_Cb)download_media_free);
848 return 1; 865 return 1;