Fix gesture bugs when using a mouse device 79/129479/1 accepted/tizen/unified/20170516.180357 submit/tizen/20170516.125641 submit/tizen/20170516.125838 tizen_4.0.m1_release
authorchanywa <cbible.kim@samsung.com>
Tue, 16 May 2017 12:56:09 +0000 (21:56 +0900)
committerchanywa <cbible.kim@samsung.com>
Tue, 16 May 2017 12:56:09 +0000 (21:56 +0900)
Change-Id: I51e494aee002665aef3e2dd7a480e50ff0b2ca8c

capi-maps-service.changes
packaging/capi-maps-service.spec
src/view/gesture_detector.h
src/view/gesture_processor.cpp
src/view/inertial_gesture.cpp
src/view/runtime_data.h

index 542002ec20af5ea3fd276788398965649e0fd9cc..491b969cb9a242327406ab32b5a146595366d7b8 100644 (file)
@@ -1,3 +1,8 @@
+[Version]   capi-maps-service_0.6.12
+[Date]      16 May 2017
+[Title]     Fix gesture bugs when using a mouse device
+[Developer] Seechan Kim <cbible.kim@samsung.com>
+
 [Version]   capi-maps-service_0.6.11
 [Date]      02 May 2017
 [Title]     Fix default values of Tizen feature to false
index 7891407ed48600b990d81b29bb84fbb71d8c5211..e0d40457dd4c076ae1919d59847e07b4f955028c 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-maps-service
 Summary:    Tizen Maps Service API
-Version:    0.6.11
+Version:    0.6.12
 Release:    1
 Group:      Location/API
 License:    Apache-2.0
index 84c7f4e8fe70e9ae3d2aa808e310b6a7f97bd4cb..3a038cfdc7992cbf4fc36eeb719f98ffbac65036 100644 (file)
@@ -98,10 +98,8 @@ namespace view
                                           unsigned int duration_min,
                                           unsigned int duration_max);
        public:
-               static int get_trajectory_effective_length(const touch_point
-                                                          &p1,
-                                                          const touch_point
-                                                          &p2);
+               static int get_trajectory_effective_length(const touch_point &p1,
+                                                          const touch_point &p2);
        public:
                enum log_colors {
                        FG_BLACK        = 30,
index 3100dd12a075c53171452b5fc716d05e66ed13f7..51e4f95cad70ee89b00967fcaf4e5f04a3f437df 100644 (file)
@@ -765,32 +765,14 @@ void view::finger_event_stream::move(Evas_Event_Mouse_Move *ev)
        if (!ev)
                return;
 
+       if (_finger_pressed[0] == false)
+               return;
+
        /* Current touch point info */
        const touch_point tp(ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp);
 
        MAPS_LOGI("finger_event_stream::move to (%d, %d)", tp._x, tp._y);
 
-       /*
-        *  The Ecore sends "move" event before "press" event
-        *  so we have to emulate the "press" for the sake of
-        *  detector simplicity
-        */
-       if (!_finger_pressed[0]) {
-               MAPS_LOGI("finger_event_stream::tap [CORRECTION]");
-               _finger_pressed[0] = true;
-               _finger_down[0] = tp;
-
-               /* Emulate finger press */
-               _d->tap(0, tp);
-       }
-
-       /* It's needed to correct the touch point, when the finger moved out of
-        * assigned movement threshold */
-       if (!_finger_moving[0] &&  !_finger_moving[1]
-           && finger_dragged_enough(0, tp)) {
-               _d->_info._finger_down[0] = tp;
-       }
-
        /*
         *  We think that the movement happend when the finger moved out of
         *  some small area.
@@ -861,32 +843,14 @@ void view::finger_event_stream::multi_move(Evas_Event_Multi_Move *ev)
        if (finger_no >= MAX_FINGERS)
                return;
 
+       if (_finger_pressed[finger_no] == false)
+               return;
+
        /* Current touch point info */
        const touch_point tp(ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp);
 
        MAPS_LOGI("finger_event_stream::multi_move to (%d, %d)", tp._x, tp._y);
 
-       /*
-        *  The Ecore sends "move" event before "press" event
-        *  so we have to emulate the "press" for the sake of
-        *  detector simplicity
-        */
-       if (!_finger_pressed[finger_no]) {
-               MAPS_LOGI("finger_event_stream::multi_tap [CORRECTION]");
-               _finger_pressed[finger_no] = true;
-               _finger_down[finger_no] = tp;
-
-               /* Emulate finger press */
-               _d->tap(finger_no, tp);
-       }
-
-       /* It's needed to correct the touch point, when the finger moved out of
-        * assigned movement threshold */
-       if (!_finger_moving[0] &&  !_finger_moving[1]
-           && finger_dragged_enough(finger_no, tp)) {
-               _d->_info._finger_down[finger_no] = tp;
-       }
-
        /*
         *  We think that the movement happend when the finger moved out of
         *  some small area.
index 84b7c0b0e652253f4087b782b0148548785a7c1f..93673185fea0db1851eb44347e36451efe196228 100644 (file)
@@ -58,8 +58,7 @@ view::inertial_gesture::inertial_gesture(const inertial_gesture &src)
 {
 }
 
-view::inertial_gesture &view::inertial_gesture::operator=(const inertial_gesture
-                                                         &src)
+view::inertial_gesture &view::inertial_gesture::operator=(const inertial_gesture &src)
 {
        return *this;
 }
index 8654346a23fbdf8540817b63ba64f46a47b1e545..538a3a8bf1d7668a2b8438b8333c5cc74ebd0c42 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "maps_view.h"
 
-#define MAX_FINGERS 10
+#define MAX_FINGERS 3
 
 namespace view
 {