From: Jehun Lim Date: Fri, 3 Jul 2015 10:02:42 +0000 (+0900) Subject: base: manage current focused menu button X-Git-Tag: accepted/tizen/tv/20150728.070555~103 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=acc85ce5a616958c20cdce707a9fec735a63a608;p=profile%2Ftv%2Fapps%2Fnative%2Fair_mediahub.git base: manage current focused menu button Change-Id: I9c671b2f25172788abaf3550afc7d459a7098cbf Signed-off-by: Jehun Lim --- diff --git a/src/view/base.c b/src/view/base.c index b007ef7..07247de 100644 --- a/src/view/base.c +++ b/src/view/base.c @@ -31,6 +31,7 @@ struct _priv { Evas_Object *win; Evas_Object *base; Evas_Object *btn[MENU_BTN_SIZE]; + Evas_Object *focused_btn; layoutmgr *lmgr; @@ -77,12 +78,15 @@ static void _focused_cb(int id, void *data, Evas_Object *obj, priv = data; + if (priv->focused_btn == obj) + return; + for (i = 0; i < MENU_BTN_SIZE; i++) { if (priv->btn[i] == obj) break; } - if (i == priv->current_layout || i == MENU_BTN_SIZE) + if (i == MENU_BTN_SIZE) return; layoutmgr_hide_layout(priv->lmgr, @@ -90,6 +94,7 @@ static void _focused_cb(int id, void *data, Evas_Object *obj, layoutmgr_show_layout(priv->lmgr, g_menu_item[i].layout_id); layoutmgr_update_layout(priv->lmgr, g_menu_item[i].layout_id, 0, NULL); + priv->focused_btn = obj; priv->current_layout = i; }