diff options
Diffstat (limited to 'thread')
-rwxr-xr-x | thread/include/msg-ui-thread-main.h | 3 | ||||
-rwxr-xr-x | thread/src/msg-ui-thread-callback.c | 16 | ||||
-rwxr-xr-x | thread/src/msg-ui-thread-main.c | 6 |
3 files changed, 25 insertions, 0 deletions
diff --git a/thread/include/msg-ui-thread-main.h b/thread/include/msg-ui-thread-main.h index 7aad78e..b063da7 100755 --- a/thread/include/msg-ui-thread-main.h +++ b/thread/include/msg-ui-thread-main.h @@ -131,6 +131,7 @@ typedef struct _MSG_THREAD_DATA { char locale[DEF_BUF_LEN]; bool isRotate; /* Rotation state */ + bool handlerIsPressed; /*pressed status of panes's handler*/ bool isIncomingMsg; /* Check there is new incoming message when it back from edit mode to normal. */ PMSG_THREAD_LIST_DATA list_data[MSG_THREAD_LIST_MAX_COUNT]; @@ -333,6 +334,8 @@ void msg_ui_thread_sweep_btn_cb(void *data, Evas_Object *obj, void *event_info); void msg_ui_thread_timezone_change_cb(keynode_t *key, void *data); void msg_ui_thread_gl_mode_right(void *data, Evas_Object *obj, void *event_info); void msg_ui_thread_gl_mode_left(void *data, Evas_Object *obj, void *event_info); +void msg_ui_thread_panes_handler_press_cb(void *data, Evas_Object *obj, void *event_info); +void msg_ui_thread_panes_handler_unpress_cb(void *data, Evas_Object *obj, void *event_info); /* THREAD UTILS */ int msg_ui_thread_launch_voice_call(const char *call_num); diff --git a/thread/src/msg-ui-thread-callback.c b/thread/src/msg-ui-thread-callback.c index 98c46ab..1598801 100755 --- a/thread/src/msg-ui-thread-callback.c +++ b/thread/src/msg-ui-thread-callback.c @@ -1116,3 +1116,19 @@ void msg_ui_thread_gl_mode_left(void *data, Evas_Object *obj, void *event_info) MSG_UI_LEAVE(); } + +void msg_ui_thread_panes_handler_press_cb(void *data, Evas_Object *obj, void *event_info) +{ + MSG_UI_RET_IF(MSG_UI_LEVEL_DEBUG, !data); + + PMSG_THREAD_DATA pData = (PMSG_THREAD_DATA)data; + pData->handlerIsPressed = true; +} + +void msg_ui_thread_panes_handler_unpress_cb(void *data, Evas_Object *obj, void *event_info) +{ + MSG_UI_RET_IF(MSG_UI_LEVEL_DEBUG, !data); + + PMSG_THREAD_DATA pData = (PMSG_THREAD_DATA)data; + pData->handlerIsPressed = false; +} diff --git a/thread/src/msg-ui-thread-main.c b/thread/src/msg-ui-thread-main.c index e89d534..2048dd0 100755 --- a/thread/src/msg-ui-thread-main.c +++ b/thread/src/msg-ui-thread-main.c @@ -340,6 +340,9 @@ Evas_Object *msg_ui_thread_create_layout_main(PMSG_THREAD_DATA pData) evas_object_size_hint_align_set(pData->panes, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(pData->panes); + evas_object_smart_callback_add(pData->panes, "press", msg_ui_thread_panes_handler_press_cb, pData); + evas_object_smart_callback_add(pData->panes, "unpress", msg_ui_thread_panes_handler_unpress_cb, pData); + elm_object_part_content_set(layout, "elm.swallow.content", pData->panes); pData->layout_main = elm_layout_add(pData->panes); @@ -892,6 +895,9 @@ void msg_ui_thread_rotation_set(void *data, int rot) if (!pData) return; + if (pData->handlerIsPressed) + evas_event_feed_mouse_up(evas_object_evas_get(pData->panes), 1, EVAS_BUTTON_NONE, 0, NULL); + if (rot == THREAD_ROTATE_ANGLE_LANDSCAPE || rot == THREAD_ROTATE_ANGLE_LANDSCAPE_UPSIDEDOWN) { pData->isRotate = true; msg_ui_thread_split_view_show(pData); |