discomfitor pushed a commit to branch enlightenment-0.20.

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

commit 7212db0fc530c4c5578c4d0111d61ca7b78e46ee
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Jan 14 15:05:33 2016 -0500

    improve menu hiding and autoclose
    
    remove menu object from autoclose (if set) and ensure that only the
    intended menu is deactivated in the autoclose callback
    
    this fixes some cases where the wrong menu could be closed (or not closed)
    due to race conditions with ecore and evas events
---
 src/bin/e_menu.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_menu.c b/src/bin/e_menu.c
index 6410b0e..7a1dbde 100644
--- a/src/bin/e_menu.c
+++ b/src/bin/e_menu.c
@@ -189,6 +189,8 @@ e_menu_hide_all(void)
         if (m->post_deactivate_cb.func)
           m->post_deactivate_cb.func(m->post_deactivate_cb.data, m);
         m->active = 0;
+        if (m->comp_object == e_comp->autoclose.obj)
+          e_comp_object_util_autoclose(NULL, NULL, NULL, NULL);
         _e_menu_unrealize(m);
         m->in_active_list = 0;
         e_object_unref(E_OBJECT(m));
@@ -2699,9 +2701,13 @@ _e_menu_cb_key_down(void *data EINA_UNUSED, 
Ecore_Event_Key *ev)
  */
 
 static void
-_e_menu_cb_mouse_evas_down(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED)
+_e_menu_cb_mouse_evas_down(void *data, Evas_Object *obj EINA_UNUSED)
 {
-   _e_menu_deactivate_all();
+   E_Menu *m = data;
+
+   while (m->parent_item)
+     m = m->parent_item->menu;
+   e_menu_deactivate(m);
 }
 
 static Eina_Bool

-- 


Reply via email to