e_input_evdev: fix data race issue of pending touch event list 27/321227/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 29 Nov 2024 06:41:11 +0000 (15:41 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 29 Nov 2024 06:58:10 +0000 (06:58 +0000)
Change-Id: Id598219e8ad94346fc7dab85fcf78b9af97e71e1
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/bin/inputmgr/e_input_evdev.c

index 8197ffc2ab3c2b0571ca98039a99394f2600522c..c14d3d32743c14c31f9eae408eb4c5ad5d89e780 100644 (file)
@@ -2342,9 +2342,6 @@ e_input_evdev_handle_touch_cancel(E_Input_Evdev *evdev, struct libinput_event_to
 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);
 }
 
@@ -2353,7 +2350,8 @@ e_input_evdev_handle_touch_frame(E_Input_Evdev *evdev, struct libinput_event_tou
 {
    EINA_SAFETY_ON_NULL_RETURN(evdev);
 
-   ecore_main_loop_thread_safe_call_async(_touch_frame_event_add, evdev);
+   _touch_event_pending_flush(evdev);
+   ecore_main_loop_thread_safe_call_async(_touch_frame_event_add, NULL);
 }
 
 static void