From: Christopher Michael Date: Sun, 11 Apr 2010 16:18:16 +0000 (+0000) Subject: Add handler for quickpanel border resize so we can adjust the total height X-Git-Tag: submit/efl/20131021.015651~7858 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6829fa5012dfb46ad9f3eee6fba375ea4b3b2725;p=platform%2Fupstream%2Fenlightenment.git Add handler for quickpanel border resize so we can adjust the total height of the quickpanel if a qp border height changes. SVN revision: 47929 --- diff --git a/src/modules/illume2/e_mod_quickpanel.c b/src/modules/illume2/e_mod_quickpanel.c index 30bdacc..5f78f54 100644 --- a/src/modules/illume2/e_mod_quickpanel.c +++ b/src/modules/illume2/e_mod_quickpanel.c @@ -5,6 +5,7 @@ static int _e_mod_quickpanel_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void *event); static int _e_mod_quickpanel_cb_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event); static int _e_mod_quickpanel_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void *event); +static int _e_mod_quickpanel_cb_border_resize(void *data __UNUSED__, int type __UNUSED__, void *event); static void _e_mod_quickpanel_cb_post_fetch(void *data __UNUSED__, void *data2); static void _e_mod_quickpanel_cb_free(E_Illume_Quickpanel *qp); static int _e_mod_quickpanel_cb_delay_hide(void *data); @@ -38,6 +39,12 @@ e_mod_quickpanel_init(void) _e_mod_quickpanel_cb_border_add, NULL)); + _qp_hdls = + eina_list_append(_qp_hdls, + ecore_event_handler_add(E_EVENT_BORDER_RESIZE, + _e_mod_quickpanel_cb_border_resize, + NULL)); + /* add hook for new borders so we can test for qp borders */ _qp_hook = e_border_hook_add(E_BORDER_HOOK_EVAL_PRE_POST_FETCH, _e_mod_quickpanel_cb_post_fetch, NULL); @@ -246,6 +253,25 @@ _e_mod_quickpanel_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void return 1; } +static int +_e_mod_quickpanel_cb_border_resize(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + E_Event_Border_Resize *ev; + E_Illume_Quickpanel *qp; + Eina_List *l; + E_Border *bd; + + ev = event; + if (!ev->border->client.illume.quickpanel.quickpanel) return 1; + if (!(qp = e_illume_quickpanel_by_zone_get(ev->border->zone))) return 1; + + qp->h = 0; + EINA_LIST_FOREACH(qp->borders, l, bd) + qp->h += bd->h; + + return 1; +} + static void _e_mod_quickpanel_cb_post_fetch(void *data __UNUSED__, void *data2) {