discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=c0a1d4104f49730018e34c8d0ac03a0eb1cd410e

commit c0a1d4104f49730018e34c8d0ac03a0eb1cd410e
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Mon Dec 9 17:05:23 2013 -0500

    hide teamwork popups on desk flip
---
 src/modules/teamwork/e_mod_tw.c | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/modules/teamwork/e_mod_tw.c b/src/modules/teamwork/e_mod_tw.c
index 68a026d..d224452 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)
    e_object_data_set(E_OBJECT(tw_mod->pop), eina_stringshare_add(uri));
 }
 
-static Eina_Bool
-focus_out(void *data EINA_UNUSED, int type EINA_UNUSED, 
E_Event_Border_Focus_Out *ev EINA_UNUSED)
+static void
+tw_handler_hide(void)
 {
-   if (!tw_mod->pop) return ECORE_CALLBACK_RENEW;
-   if (e_config->focus_policy == E_FOCUS_CLICK) return ECORE_CALLBACK_RENEW;
-   if (tw_mod->force || tw_mod->sticky) return ECORE_CALLBACK_RENEW;
+   if (tw_mod->force || tw_mod->sticky) return;
    if (tw_config->mouse_out_delay)
      {
         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
    else
      tw_hide(NULL);
    tw_mod->force = 0;
+}
+
+static Eina_Bool
+desk_show(void *data EINA_UNUSED, int type EINA_UNUSED, 
E_Event_Border_Focus_Out *ev EINA_UNUSED)
+{
+   if (tw_mod->pop) tw_handler_hide();
+   return ECORE_CALLBACK_RENEW;
+}
+
+static Eina_Bool
+focus_out(void *data EINA_UNUSED, int type EINA_UNUSED, 
E_Event_Border_Focus_Out *ev EINA_UNUSED)
+{
+   if (e_config->focus_policy == E_FOCUS_CLICK) return ECORE_CALLBACK_RENEW;
+   if (tw_mod->pop) tw_handler_hide();
    return ECORE_CALLBACK_RENEW;
 }
 
@@ -1200,6 +1212,7 @@ e_tw_init(void)
    E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_PROGRESS, 
download_media_status, tw_mod);
    E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_DATA, 
download_media_data, tw_mod);
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_BORDER_FOCUS_OUT, focus_out, 
tw_mod);
+   E_LIST_HANDLER_APPEND(handlers, E_EVENT_DESK_SHOW, desk_show, tw_mod);
 
    tw_mod->media = 
eina_hash_string_superfast_new((Eina_Free_Cb)download_media_free);
    return 1;

-- 


Reply via email to