discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=d0e21c912a1326891191394b826a1a0b46cb0ea2
commit d0e21c912a1326891191394b826a1a0b46cb0ea2 Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Mon Oct 17 11:55:23 2016 -0400 add gadget_site_(un)locked smart callbacks for forcing gadget site visibility useful for cases where the gadget site has no popups to manage but visibility must be maintained ref T4732 --- src/bin/e_bryce.c | 22 ++++++++++++++++++++++ src/bin/e_gadget.c | 2 ++ src/bin/e_gadget.h | 4 ++++ 3 files changed, 28 insertions(+) diff --git a/src/bin/e_bryce.c b/src/bin/e_bryce.c index ddb26e3..ef876b5 100644 --- a/src/bin/e_bryce.c +++ b/src/bin/e_bryce.c @@ -784,6 +784,26 @@ _bryce_gadget_popup(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) } static void +_bryce_gadget_locked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + Bryce *b = data; + + b->autohide_blocked++; + if (b->autohide) + _bryce_autohide_show(b); +} + +static void +_bryce_gadget_unlocked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + Bryce *b = data; + + b->autohide_blocked--; + if (b->autohide && (!b->mouse_in)) + _bryce_autohide_hide(b); +} + +static void _bryce_site_anchor(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { Bryce *b = data; @@ -814,6 +834,8 @@ _bryce_orient(Bryce *b) evas_object_smart_callback_add(b->site, "gadget_site_style_menu", _bryce_style_menu, b); evas_object_smart_callback_add(b->site, "gadget_site_owner_menu", _bryce_owner_menu, b); evas_object_smart_callback_add(b->site, "gadget_site_popup", _bryce_gadget_popup, b); + evas_object_smart_callback_add(b->site, "gadget_site_locked", _bryce_gadget_locked, b); + evas_object_smart_callback_add(b->site, "gadget_site_unlocked", _bryce_gadget_unlocked, b); } static void diff --git a/src/bin/e_gadget.c b/src/bin/e_gadget.c index 4f4fe5c..3eced98 100644 --- a/src/bin/e_gadget.c +++ b/src/bin/e_gadget.c @@ -291,6 +291,7 @@ _gadget_wizard_end(void *data, int id) E_Gadget_Config *zgc = data; zgc->id = id; + evas_object_smart_callback_call(zgc->site->layout, "gadget_site_unlocked", NULL); _gadget_object_finalize(zgc); } @@ -307,6 +308,7 @@ _gadget_object_create(E_Gadget_Config *zgc) { if (t->wizard) { + evas_object_smart_callback_call(zgc->site->layout, "gadget_site_locked", NULL); t->wizard(_gadget_wizard_end, zgc); added = 1; return EINA_TRUE; diff --git a/src/bin/e_gadget.h b/src/bin/e_gadget.h index 53945e3..9999d9b 100644 --- a/src/bin/e_gadget.h +++ b/src/bin/e_gadget.h @@ -29,6 +29,10 @@ - the anchor of the gadget site changed "gadget_site_gravity" - the gravity of the gadget site changed + "gadget_site_locked" + - the gadget site's visibility has been locked (must be visible) + "gadget_site_unlocked" + - the gadget site's visibility has been unlocked (can be hidden) * } * have E_Menu as event_info --