Fix timestamp overflow issue 51/290051/2 accepted/tizen/unified/20230329.013236
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 17 Mar 2023 13:44:44 +0000 (22:44 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 22 Mar 2023 07:38:07 +0000 (16:38 +0900)
Change-Id: I2fcdd60b7beaa88ddb150e4e7f9b7c445f67e17e
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/e_dispatch_gesture_event.c
src/e_dispatch_rotary_event.c
src/e_screen_reader_gestures.c

index e693bca..87f4929 100644 (file)
@@ -30,7 +30,7 @@ static void _dispatch_mouse_move_event(int x, int y, int device)
 
    if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Move)))) return;
 
-   ev->timestamp = (int)(ecore_time_get() * 1000.0);
+   ev->timestamp = e_util_timestamp_get();
    ev->x = x;
    ev->y = y;
    ev->root.x = x;
@@ -63,7 +63,7 @@ static void _dispatch_mouse_down_event(int x, int y, int device)
    if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)))) return;
 
    ev->buttons = 1;
-   ev->timestamp = (int)(ecore_time_get() * 1000.0);
+   ev->timestamp = e_util_timestamp_get();
    ev->x = x;
    ev->y = y;
    ev->root.x = x;
@@ -98,7 +98,7 @@ static void _dispatch_mouse_up_event(int x, int y, int device)
    if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)))) return;
 
    ev->buttons = 1;
-   ev->timestamp = (int)(ecore_time_get() * 1000.0);
+   ev->timestamp = e_util_timestamp_get();
    ev->x = x;
    ev->y = y;
    ev->root.x = x;
index 4463ac6..01acf50 100644 (file)
@@ -25,7 +25,7 @@ _create_wheel_event(int z_coordinate)
    ev->root_window = e_comp->ee_win;
    ev->event_window = e_comp->ee_win;
 
-   ev->timestamp= (int)(ecore_time_get() * 1000.0);
+   ev->timestamp= e_util_timestamp_get();
    ev->modifiers = 0;
 
    ev->same_screen = 1;
index 588bf36..9277b66 100644 (file)
@@ -233,7 +233,7 @@ static void _emit_mouse_move_event ( Ecore_Event_Mouse_Button *ev_btn)
    ev_move->multi.y = ev_btn->multi.y;
    ev_move->multi.root.x = ev_btn->multi.root.x;
    ev_move->multi.root.y = ev_btn->multi.root.y;
-   ev_move->timestamp = (int)(ecore_time_get() * 1000);
+   ev_move->timestamp = e_util_timestamp_get();
    ev_move->multi.radius = MAGIC_NUMBER + 10.0;
    ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev_move, NULL, NULL);
 }
@@ -658,7 +658,7 @@ start_scroll(Cover *cov)
         cov->flick_gesture.object_needs_scroll_y_delta = 0;
      }
 
-   cov->flick_gesture.ev_first_down->timestamp = (int)(ecore_time_get() * 1000);
+   cov->flick_gesture.ev_first_down->timestamp = e_util_timestamp_get();
    cov->flick_gesture.ev_first_down->multi.radius += MAGIC_NUMBER;
    _emit_mouse_move_event(cov->flick_gesture.ev_first_down);
    ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, cov->flick_gesture.ev_first_down, NULL, NULL);