Fixed TSAM-6566 : Blocks mouse move events 59/80359/2 accepted/tizen/mobile/20160718.105336 submit/tizen/20160726.073037 submit/tizen_mobile/20160718.020618
authorEunyoung Lee <ey928.lee@samsung.com>
Sun, 17 Jul 2016 08:55:52 +0000 (17:55 +0900)
committerEunyoung Lee <ey928.lee@samsung.com>
Mon, 18 Jul 2016 01:10:47 +0000 (10:10 +0900)
Change-Id: Ia370a8350b5b902e0e8fac22f76c035087c924d1

daemon/minictrl/minictrl.c
daemon/notifications/noti_list_item.c

index 5c5ccf5..b4fcb23 100755 (executable)
@@ -85,8 +85,10 @@ struct _viewer_item {
 
 static struct _info {
        GHashTable *prov_table;
+       Eina_Bool mouse_event_blocker;
 } s_info = {
        .prov_table = NULL,
+       .mouse_event_blocker = EINA_TRUE,
 };
 
 void _minictrl_sendview_rotation_event(const char* name, int angle);
@@ -217,6 +219,10 @@ static void _mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_in
        Evas_Event_Mouse_Down *ev;
        struct _viewer_item *vit;
 
+       if (s_info.mouse_event_blocker == EINA_TRUE) {
+               s_info.mouse_event_blocker = EINA_FALSE;
+       }
+
        vit = evas_object_data_get(obj, MINICONTROL_VIEW_DATA);
        ev = (Evas_Event_Mouse_Down *)event_info;
 
@@ -254,6 +260,10 @@ static void _mouse_move_cb(void* data, Evas* e, Evas_Object* obj, void* event_in
        struct _viewer_item *vit;
        struct appdata *ad;
 
+       if (s_info.mouse_event_blocker == EINA_TRUE) {
+               return;
+       }
+
        ad = data;
        ev = event_info;
        vit = evas_object_data_get(obj, MINICONTROL_VIEW_DATA);
@@ -362,6 +372,10 @@ static void _mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info
        struct appdata *ad;
        int swipe_distance;
 
+       if (s_info.mouse_event_blocker == EINA_FALSE) {
+               s_info.mouse_event_blocker = EINA_TRUE;
+       }
+
        ad = data;
        vit = evas_object_data_get(obj, MINICONTROL_VIEW_DATA);
        if (!vit || !ad) {
@@ -620,7 +634,7 @@ static Eina_Bool _anim_init_cb(void *data)
                        .handler = NULL,
                },
        };
-       
+
        vi = data;
        if (!vi) {
                ERR("Invalid parameter");
index 707f271..32c5fa5 100755 (executable)
@@ -61,6 +61,7 @@ extern Noti_View_H ongoing_noti_view_h;
 static struct _info {
        int item_debug_step;
        Noti_View_H *view_handlers[NOTIFICATION_LY_MAX + 1];
+       Eina_Bool mouse_event_blocker;
 } s_info = {
        .item_debug_step = 0,
        .view_handlers = {
@@ -72,6 +73,7 @@ static struct _info {
                &ongoing_noti_view_h,
                NULL,
        },
+       .mouse_event_blocker = EINA_TRUE,
 };
 
 static int _is_item_deletable_by_gesture(noti_list_item_h *handler)
@@ -190,6 +192,10 @@ void static _mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_in
        Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *)event_info;
        retif(ev == NULL, , "event_info is NULL");
 
+       if (s_info.mouse_event_blocker == EINA_TRUE) {
+               s_info.mouse_event_blocker = EINA_FALSE;
+       }
+
        handler = _item_handler_get(obj);
        retif(handler == NULL, , "handler is NULL");
 
@@ -225,6 +231,10 @@ static void _mouse_move_cb(void* data, Evas* e, Evas_Object* obj, void* event_in
        QP_VI *vi = NULL;
        retif(ev == NULL, , "event_info is NULL");
 
+       if (s_info.mouse_event_blocker == EINA_TRUE) {
+               return;
+       }
+
        handler = _item_handler_get(obj);
        retif(handler == NULL, , "handler is NULL");
 
@@ -288,6 +298,10 @@ static void _mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info
        int x = 0;
        noti_list_item_h *handler;
 
+       if (s_info.mouse_event_blocker == EINA_FALSE) {
+               s_info.mouse_event_blocker = EINA_TRUE;
+       }
+
        handler = _item_handler_get(obj);
        retif(handler == NULL, , "handler is NULL");