From 00f3736e9802d26f4ce04f32053d5f28d7bc0450 Mon Sep 17 00:00:00 2001 From: YoungHun Cho Date: Fri, 16 Dec 2016 13:34:31 +0900 Subject: Bezel swipe down disable / enable Change-Id: I2a71bab0cf7bfc91763d196887883144c73fe2bc Signed-off-by: YoungHun Cho --- home/src/moments/moments_manager.c | 2 ++ home/src/moments/moments_view.c | 11 +++++++++++ home/src/scroller.c | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/home/src/moments/moments_manager.c b/home/src/moments/moments_manager.c index eded062..c3bbfab 100755 --- a/home/src/moments/moments_manager.c +++ b/home/src/moments/moments_manager.c @@ -15,6 +15,7 @@ */ #include + #include "log.h" #include "moments/moments.h" #include "moments/moments_view.h" @@ -66,6 +67,7 @@ void moments_show(void) _E("failed to show moment-bar"); return ; } + scroller_freeze(s_info.bg_scroller); s_info.visible = true; diff --git a/home/src/moments/moments_view.c b/home/src/moments/moments_view.c index 2e839a4..b4a61d7 100755 --- a/home/src/moments/moments_view.c +++ b/home/src/moments/moments_view.c @@ -30,6 +30,7 @@ #define BASE_LAYOUT_EDJE EDJE_DIR"/circle/moments_layout.edj" static struct __view_s { + Evas_Object *win; Evas_Object *layout; Evas_Object *size_setter; Evas_Object *content; @@ -37,6 +38,7 @@ static struct __view_s { bool is_drawing_up; int down_y; } s_info = { + .win = NULL, .layout = NULL, .size_setter = NULL, .content = NULL, @@ -63,6 +65,7 @@ Evas_Object *moments_create_ui(Evas_Object *base_win) { _D("%s", __func__); + s_info.win = base_win; s_info.layout = __create_base_layout(base_win); if (s_info.layout == NULL) goto __fail; @@ -219,6 +222,10 @@ static void __freeze_touch_event(void) } */ + int id = elm_win_aux_hint_id_get(s_info.win, "wm.policy.win.gesture.disable"); + _D("hint set wm.policy.win.gesture.disable 1 id %d", id); + elm_win_aux_hint_val_set(s_info.win, id, "1"); + evas_object_event_callback_del(s_info.content, EVAS_CALLBACK_MOUSE_UP, __up_cb); evas_object_event_callback_del(s_info.content, EVAS_CALLBACK_MOUSE_MOVE, __move_cb); evas_object_event_callback_del(s_info.content, EVAS_CALLBACK_MOUSE_DOWN, __down_cb); @@ -240,6 +247,10 @@ static void __unfreeze_touch_event(void) } */ + int id = elm_win_aux_hint_id_get(s_info.win, "wm.policy.win.gesture.disable"); + _D("hint set wm.policy.win.gesture.disable 0 id %d", id); + elm_win_aux_hint_val_set(s_info.win, id, "0"); + evas_object_event_callback_add(s_info.content, EVAS_CALLBACK_MOUSE_DOWN, __down_cb, NULL); evas_object_event_callback_add(s_info.content, EVAS_CALLBACK_MOUSE_MOVE, __move_cb, NULL); evas_object_event_callback_add(s_info.content, EVAS_CALLBACK_MOUSE_UP, __up_cb, NULL); diff --git a/home/src/scroller.c b/home/src/scroller.c index 295cf37..7b0a9b0 100755 --- a/home/src/scroller.c +++ b/home/src/scroller.c @@ -519,8 +519,14 @@ static void _anim_stop_cb(void *data, Evas_Object *scroller, void *event_info) } if (page == main_get_info()->clock_focus) { + int id = elm_win_aux_hint_id_get(main_get_info()->win, "wm.policy.win.gesture.disable"); + _D("hint set wm.policy.win.gesture.disable 1 id %d", id); + elm_win_aux_hint_val_set(main_get_info()->win, id, "1"); vconf_set_bool(VCONFKEY_HOMESCREEN_WATCH_FACE_VISIBILITY, EINA_TRUE); } else { + int id = elm_win_aux_hint_id_get(main_get_info()->win, "wm.policy.win.gesture.disable"); + _D("hint set wm.policy.win.gesture.disable 0 id %d", id); + elm_win_aux_hint_val_set(main_get_info()->win, id, "0"); vconf_set_bool(VCONFKEY_HOMESCREEN_WATCH_FACE_VISIBILITY, EINA_FALSE); } } -- cgit v1.2.3