Give chance to focus widget after accidentaly entered move slider mode 38/277238/1
authorLukasz Oleksak <l.oleksak@samsung.com>
Mon, 27 Jun 2022 13:07:33 +0000 (15:07 +0200)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 4 Jul 2022 04:58:34 +0000 (13:58 +0900)
Change-Id: Icc24c4747212f993bcaca5a0af747c115b037eef

src/navigator.c

index 9ec63da2ab043e2d3108cbcc671ea2446103ac0b..c6be2912724949fae0a6fd1e9cdab95ed921e55f 100644 (file)
@@ -2277,8 +2277,9 @@ TIZEN_PROD_STATIC void on_gesture_detected(void *data, const Eldbus_Message *msg
        case ONE_FINGER_HOVER:
                if (nd->prepared) {
                        DEBUG("Prepare to move slider");
-                       _move_slider(nd, info);
-               } else {
+                       _move_slider(nd, info); // on recoverable failure sets nd->prepared to false to give a chance to focus widget
+               }
+               if (!nd->prepared) {
                        if (nd->last_hover_event_time < 0)
                                nd->last_hover_event_time = info->event_time;
                        //info->event_time and last_hover_event_time contain timestamp in ms.
@@ -2351,6 +2352,8 @@ TIZEN_PROD_STATIC void on_gesture_detected(void *data, const Eldbus_Message *msg
                        to make highlight on keypad window. */
                        //break;
                }
+               if (info->state == 2 && nd->prepared)
+                       nd->prepared = false;
                if (!nd->prepared)
                        _focus_widget(nd, info);
                break;