summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2013-12-09 17:05:23 -0500
committerMike Blumenkrantz <zmike@samsung.com>2013-12-09 17:05:42 -0500
commitc0a1d4104f49730018e34c8d0ac03a0eb1cd410e (patch)
treea05224f2933949f79fedcd49fed66ab17d81f699 /src
parent6bcdc4efab3cf3aa2265c9e903edeb48dc876468 (diff)
hide teamwork popups on desk flip
Diffstat (limited to 'src')
-rw-r--r--src/modules/teamwork/e_mod_tw.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/modules/teamwork/e_mod_tw.c b/src/modules/teamwork/e_mod_tw.c
index 68a026d0c..d2244527b 100644
--- a/src/modules/teamwork/e_mod_tw.c
+++ b/src/modules/teamwork/e_mod_tw.c
@@ -1113,12 +1113,10 @@ tw_show_local_file(const char *uri)
1113 e_object_data_set(E_OBJECT(tw_mod->pop), eina_stringshare_add(uri)); 1113 e_object_data_set(E_OBJECT(tw_mod->pop), eina_stringshare_add(uri));
1114} 1114}
1115 1115
1116static Eina_Bool 1116static void
1117focus_out(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Border_Focus_Out *ev EINA_UNUSED) 1117tw_handler_hide(void)
1118{ 1118{
1119 if (!tw_mod->pop) return ECORE_CALLBACK_RENEW; 1119 if (tw_mod->force || tw_mod->sticky) return;
1120 if (e_config->focus_policy == E_FOCUS_CLICK) return ECORE_CALLBACK_RENEW;
1121 if (tw_mod->force || tw_mod->sticky) return ECORE_CALLBACK_RENEW;
1122 if (tw_config->mouse_out_delay) 1120 if (tw_config->mouse_out_delay)
1123 { 1121 {
1124 if (tw_hide_timer) ecore_timer_reset(tw_hide_timer); 1122 if (tw_hide_timer) ecore_timer_reset(tw_hide_timer);
@@ -1127,6 +1125,20 @@ focus_out(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Border_Focus_Out
1127 else 1125 else
1128 tw_hide(NULL); 1126 tw_hide(NULL);
1129 tw_mod->force = 0; 1127 tw_mod->force = 0;
1128}
1129
1130static Eina_Bool
1131desk_show(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Border_Focus_Out *ev EINA_UNUSED)
1132{
1133 if (tw_mod->pop) tw_handler_hide();
1134 return ECORE_CALLBACK_RENEW;
1135}
1136
1137static Eina_Bool
1138focus_out(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Border_Focus_Out *ev EINA_UNUSED)
1139{
1140 if (e_config->focus_policy == E_FOCUS_CLICK) return ECORE_CALLBACK_RENEW;
1141 if (tw_mod->pop) tw_handler_hide();
1130 return ECORE_CALLBACK_RENEW; 1142 return ECORE_CALLBACK_RENEW;
1131} 1143}
1132 1144
@@ -1200,6 +1212,7 @@ e_tw_init(void)
1200 E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_PROGRESS, download_media_status, tw_mod); 1212 E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_PROGRESS, download_media_status, tw_mod);
1201 E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_DATA, download_media_data, tw_mod); 1213 E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_DATA, download_media_data, tw_mod);
1202 E_LIST_HANDLER_APPEND(handlers, E_EVENT_BORDER_FOCUS_OUT, focus_out, tw_mod); 1214 E_LIST_HANDLER_APPEND(handlers, E_EVENT_BORDER_FOCUS_OUT, focus_out, tw_mod);
1215 E_LIST_HANDLER_APPEND(handlers, E_EVENT_DESK_SHOW, desk_show, tw_mod);
1203 1216
1204 tw_mod->media = eina_hash_string_superfast_new((Eina_Free_Cb)download_media_free); 1217 tw_mod->media = eina_hash_string_superfast_new((Eina_Free_Cb)download_media_free);
1205 return 1; 1218 return 1;