e_comp_wl: add mouse/touch event log 62/322462/3
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 4 Apr 2025 11:21:03 +0000 (20:21 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 9 Apr 2025 10:23:41 +0000 (19:23 +0900)
Change-Id: I443095c283d0d613a62d74ff1df3e2e6cf02f67a
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/bin/server/e_comp_wl.c

index eeb7d8f37d1da765dad892ebf3462eb3a476b75c..1ddf6dbab8cf1500bb651ba7f417c364f8659fe3 100644 (file)
@@ -2459,7 +2459,7 @@ _e_comp_wl_cb_mouse_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mou
    E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
    E_Client *ec = NULL;
    Evas_Device *dev = NULL;
-   E_Comp_Config *comp_conf;
+   E_Comp_Config *comp_conf = NULL;
    Ecore_Device_Class dev_class;
    E_Zone *client_zone;
    const char *dev_name;
@@ -2576,6 +2576,7 @@ _e_comp_wl_cb_mouse_wheel(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mo
    char *seat_name;
    struct wl_resource *surface;
    Ecore_Device *dev = NULL;
+   E_Comp_Config *comp_conf = NULL;
 
    dev = ev->dev;
 
@@ -2607,6 +2608,12 @@ _e_comp_wl_cb_mouse_wheel(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mo
 
    _e_comp_wl_mouse_wheel_send(comp_wl, ec, ev->direction, ev->z, ev->timestamp);
 
+   comp_conf = e_comp_config_get();
+   if (comp_conf && comp_conf->input_log_enable)
+     ELOGF("Mouse", "Mouse Wheel (time: %d, direction: %d, z: %d, name:%20s)",
+           NULL, ev->timestamp, ev->direction, ev->z,
+           e_client_util_name_get(ec) ?: "NO NAME");
+
    if (!need_send_released) // set cursor's hide_tmr only when mouse button is not pressed
      {
         if (_e_comp_wl_check_cursor_timer_needed(ec))
@@ -2626,7 +2633,7 @@ _e_comp_wl_zone_send_mouse_button(Ecore_Event_Mouse_Button *ev, Eina_Bool presse
    const char *dev_name, *dev_identifier;
    char *seat_name;
    E_Client *ec = NULL;
-   E_Comp_Config *comp_conf;
+   E_Comp_Config *comp_conf = NULL;
    E_Zone *client_zone;
 
    if (ev->multi.device == 0)
@@ -2643,16 +2650,14 @@ _e_comp_wl_zone_send_mouse_button(Ecore_Event_Mouse_Button *ev, Eina_Bool presse
    dev_identifier = ecore_device_identifier_get(dev);
    seat_name = ecore_device_ex_seatname_get(dev);
 
+   client_zone = e_seat_zone_get(e_seat_find(seat_name));
+   ec = _e_comp_wl_under_position_input_ec_get(client_zone, ev->x, ev->y);
+
    comp_conf = e_comp_config_get();
    if (comp_conf && comp_conf->input_log_enable)
-     ELOGF("Mouse", "%s (time: %d, idx: %d, position(%d, %d), dev_name:%s, identifier: %s, clas: %d, seatname:%s)",
+     ELOGF("Mouse", "%s (time: %d, idx: %d, position(%d, %d), dev_name:%s, identifier: %s, clas: %d, seatname:%s, name:%20s)",
            NULL, pressed ? "Down" : "Up", ev->timestamp, ev->multi.device, ev->x, ev->y,
-           dev_name, dev_identifier, dev_class, seat_name);
-
-   seat_name = ecore_device_ex_seatname_get(dev);
-   client_zone = e_seat_zone_get(e_seat_find(seat_name));
-
-   ec = _e_comp_wl_under_position_input_ec_get(client_zone, ev->x, ev->y);
+           dev_name, dev_identifier, dev_class, seat_name, e_client_util_name_get(ec) ?: "NO NAME");
 
    comp_wl = e_comp_wl_get();
    _e_comp_wl_device_send_event_ecore_device(comp_wl, ec, dev, ev->timestamp);