e_input_evdev: fix data race issue of pending touch event list 21/315321/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 29 Nov 2024 06:41:11 +0000 (15:41 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Sat, 30 Nov 2024 12:14:29 +0000 (21:14 +0900)
Change-Id: Id598219e8ad94346fc7dab85fcf78b9af97e71e1
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/bin/e_input_evdev.c

index 6fd4858a2fe581b30b27f498af1954b0947e61ec..6a3c19ee3476a17dda03c2c088538cd3ccd25827 100644 (file)
@@ -2162,9 +2162,6 @@ _device_handle_touch_cancel(struct libinput_device *device, struct libinput_even
 static void
 _touch_frame_event_add(void *data)
 {
-   E_Input_Evdev *evdev = data;
-
-   _touch_event_pending_flush(evdev);
    ecore_event_add(E_EVENT_INPUT_TOUCH_FRAME, NULL, NULL, NULL);
 }
 
@@ -2176,7 +2173,8 @@ _device_handle_touch_frame(struct libinput_device *device, struct libinput_event
    if (!(edev = libinput_device_get_user_data(device)))
      return;
 
-   ecore_main_loop_thread_safe_call_async(_touch_frame_event_add, edev);
+   _touch_event_pending_flush(edev);
+   ecore_main_loop_thread_safe_call_async(_touch_frame_event_add, NULL);
 }
 
 static void