e_input_evdev: Add log for analyzing mouse event lagging 51/319051/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 24 Jan 2025 11:45:42 +0000 (20:45 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Tue, 4 Feb 2025 01:22:22 +0000 (01:22 +0000)
Change-Id: I7e39f83d91988cf6ba7f1135a38d4d37a5cec686
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/bin/inputmgr/e_input_evdev.c

index f3ab43726e65c47fb09fb8de9134ba5df0c9c73a..9aefe78e44fb147917efb4b365edf7783e9be07b 100644 (file)
@@ -1967,6 +1967,7 @@ _device_handle_touch_motion_send(E_Input_Evdev *evdev, struct libinput_event_tou
    E_Device *e_dev = NULL;
    uint32_t timestamp = 0;
    double radius_x = 1.0, radius_y = 1.0, pressure = 1.0, angle = 0.0;
+   E_Comp_Config *comp_conf = NULL;
 
    if (!evdev) return;
    if (!(input = e_input_seat_input_get(evdev->seat))) return;
@@ -2016,6 +2017,10 @@ _device_handle_touch_motion_send(E_Input_Evdev *evdev, struct libinput_event_tou
         ev->dev = (Eo *)g_object_ref(e_dev);
      }
 
+   comp_conf = e_comp_config_get();
+   if (comp_conf && comp_conf->input_log_enable)
+     ELOGF("Touch", "Move (id: %d, x: %d, y: %d)", NULL, evdev->mt_slot, ev->x, ev->y);
+
    if (!_touch_event_pending_add(evdev, ECORE_EVENT_MOUSE_MOVE, ev))
      {
         ELOGF("Touch", "Failed to pend event (MOVE). Call ecore_event_add immediately.", NULL);
@@ -2030,6 +2035,7 @@ _device_handle_touch_cancel_send(E_Input_Evdev *evdev, struct libinput_event_tou
    Ecore_Event_Mouse_Button *ev;
    uint32_t timestamp, button = 0;
    E_Device *e_dev = NULL;
+   E_Comp_Config *comp_conf = NULL;
 
    if (!evdev) return;
    if (!(input = e_input_seat_input_get(evdev->seat))) return;
@@ -2070,6 +2076,11 @@ _device_handle_touch_cancel_send(E_Input_Evdev *evdev, struct libinput_event_tou
         ev->dev = (Eo *)g_object_ref(e_dev);
      }
 
+   comp_conf = e_comp_config_get();
+   if (comp_conf && comp_conf->input_log_enable)
+     ELOGF("Touch", "Cancel (x: %d, y: %d, timestamp: %u (current time), device: %s)", NULL,
+           ev->x, ev->y, ev->timestamp, evdev->name);
+
    if (!_touch_event_pending_add(evdev, ECORE_EVENT_MOUSE_BUTTON_CANCEL, ev))
      {
         ELOGF("Touch", "Failed to pend event (CANCEL). Call ecore_event_add immediately.", NULL);