e_input: do not add 'normal' Mouse Move events when sending 'relative' Move 23/296823/2
authorduna.oh <duna.oh@samsung.com>
Fri, 4 Aug 2023 03:02:58 +0000 (12:02 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 4 Aug 2023 09:43:01 +0000 (09:43 +0000)
Change-Id: I57cbfd27f8b9c04dc618cd486583f71f2f010ffa

src/bin/e_input_evdev.c

index d61e1f5..8a08e02 100644 (file)
@@ -884,10 +884,19 @@ _e_input_pointer_motion_post(E_Input_Evdev *edev)
 }
 
 static void
-_device_pointer_relative_motion_send(double dx[2], double dy[2], uint64_t time_us)
+_device_pointer_motion_send(E_Input_Evdev *edev, struct libinput_event_pointer *event, double dx[2], double dy[2])
 {
+   uint64_t time_us;
    e_input_relative_motion_cb func = e_input_relative_motion_handler_get();
-   if (func) func(dx, dy, time_us);
+   if (func)
+     {
+        time_us = libinput_event_pointer_get_time_usec(event);
+        func(dx, dy, time_us);
+     }
+   else
+     {
+        _device_pointer_motion(edev, event);
+     }
 }
 
 static void
@@ -951,9 +960,7 @@ _device_handle_pointer_motion(struct libinput_device *device, struct libinput_ev
         return;
      }
 
-  _device_pointer_relative_motion_send(&delta_x[0], &delta_y[0],
-                                       libinput_event_pointer_get_time_usec(event));
-  _device_pointer_motion(edev, event);
+   _device_pointer_motion_send(edev, event, &delta_x[0], &delta_y[0]);
 }
 
 static void