summaryrefslogtreecommitdiff
path: root/src/lib/elput/elput_evdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elput/elput_evdev.c')
-rw-r--r--src/lib/elput/elput_evdev.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index c7698538c3..9580f49909 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -685,6 +685,23 @@ _pointer_motion_send(Elput_Device *edev)
685 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL); 685 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL);
686} 686}
687 687
688static void
689_pointer_motion_relative(struct libinput_event_pointer *event)
690{
691 Elput_Event_Pointer_Motion *ev;
692
693 ev = calloc(1, sizeof(Elput_Event_Pointer_Motion));
694 EINA_SAFETY_ON_NULL_RETURN(ev);
695
696 ev->time_usec = libinput_event_pointer_get_time_usec(event);
697 ev->dx = libinput_event_pointer_get_dx(event);
698 ev->dy = libinput_event_pointer_get_dy(event);
699 ev->dx_unaccel = libinput_event_pointer_get_dx_unaccelerated(event);
700 ev->dy_unaccel = libinput_event_pointer_get_dy_unaccelerated(event);
701
702 ecore_event_add(ELPUT_EVENT_POINTER_MOTION, ev, NULL, NULL);
703}
704
688static Eina_Bool 705static Eina_Bool
689_pointer_motion(struct libinput_device *idev, struct libinput_event_pointer *event) 706_pointer_motion(struct libinput_device *idev, struct libinput_event_pointer *event)
690{ 707{
@@ -702,6 +719,7 @@ _pointer_motion(struct libinput_device *idev, struct libinput_event_pointer *eve
702 ptr->timestamp = libinput_event_pointer_get_time(event); 719 ptr->timestamp = libinput_event_pointer_get_time(event);
703 720
704 _pointer_motion_send(edev); 721 _pointer_motion_send(edev);
722 _pointer_motion_relative(event);
705 723
706 return EINA_TRUE; 724 return EINA_TRUE;
707} 725}
@@ -725,6 +743,7 @@ _pointer_motion_abs(struct libinput_device *idev, struct libinput_event_pointer
725 /* TODO: these needs to run a matrix transform based on output */ 743 /* TODO: these needs to run a matrix transform based on output */
726 744
727 _pointer_motion_send(edev); 745 _pointer_motion_send(edev);
746 _pointer_motion_relative(event);
728 747
729 return EINA_TRUE; 748 return EINA_TRUE;
730} 749}