diff options
author | Chris Michael <cp.michael@samsung.com> | 2014-12-10 12:01:16 -0500 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2014-12-10 12:01:59 -0500 |
commit | 5d767aff32e42040da0dd6a5c4d70cff7139e1b2 (patch) | |
tree | 026012e9be11b3d8b4ab5ec3d1b98b11802603f5 /src/lib/ecore_drm/ecore_drm_evdev.c | |
parent | 9980082c6acbb4a4849cc5fcc520907d3969bfd8 (diff) |
ecore-drm: Finish implementing touch events
Summary: This fixes the touch events to actually send button down/up
when the proper touch event occurs
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to '')
-rw-r--r-- | src/lib/ecore_drm/ecore_drm_evdev.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c b/src/lib/ecore_drm/ecore_drm_evdev.c index fbcb9def74..333977172c 100644 --- a/src/lib/ecore_drm/ecore_drm_evdev.c +++ b/src/lib/ecore_drm/ecore_drm_evdev.c | |||
@@ -589,7 +589,7 @@ _device_handle_touch_event(Ecore_Drm_Evdev *edev, struct libinput_event_touch *e | |||
589 | edev->mouse.prev_button = button; | 589 | edev->mouse.prev_button = button; |
590 | } | 590 | } |
591 | 591 | ||
592 | ev->buttons = button; | 592 | ev->buttons = ((button & 0x00F) + 1); |
593 | 593 | ||
594 | if (edev->mouse.did_double) | 594 | if (edev->mouse.did_double) |
595 | ev->double_click = 1; | 595 | ev->double_click = 1; |
@@ -610,6 +610,7 @@ _device_handle_touch_down(struct libinput_device *device, struct libinput_event_ | |||
610 | libinput_event_touch_get_x_transformed(event, edev->output.w); | 610 | libinput_event_touch_get_x_transformed(event, edev->output.w); |
611 | edev->mouse.y = | 611 | edev->mouse.y = |
612 | libinput_event_touch_get_y_transformed(event, edev->output.h); | 612 | libinput_event_touch_get_y_transformed(event, edev->output.h); |
613 | |||
613 | edev->mt_slot = libinput_event_touch_get_seat_slot(event); | 614 | edev->mt_slot = libinput_event_touch_get_seat_slot(event); |
614 | 615 | ||
615 | _device_handle_touch_event(edev, event, ECORE_EVENT_MOUSE_BUTTON_DOWN); | 616 | _device_handle_touch_event(edev, event, ECORE_EVENT_MOUSE_BUTTON_DOWN); |
@@ -631,6 +632,7 @@ _device_handle_touch_motion(struct libinput_device *device, struct libinput_even | |||
631 | libinput_event_touch_get_x_transformed(event, edev->output.w); | 632 | libinput_event_touch_get_x_transformed(event, edev->output.w); |
632 | edev->mouse.y = | 633 | edev->mouse.y = |
633 | libinput_event_touch_get_y_transformed(event, edev->output.h); | 634 | libinput_event_touch_get_y_transformed(event, edev->output.h); |
635 | |||
634 | edev->mt_slot = libinput_event_touch_get_seat_slot(event); | 636 | edev->mt_slot = libinput_event_touch_get_seat_slot(event); |
635 | 637 | ||
636 | ev->window = (Ecore_Window)input->dev->window; | 638 | ev->window = (Ecore_Window)input->dev->window; |
@@ -642,7 +644,8 @@ _device_handle_touch_motion(struct libinput_device *device, struct libinput_even | |||
642 | /* NB: Commented out. This borks mouse movement if no key has been | 644 | /* NB: Commented out. This borks mouse movement if no key has been |
643 | * pressed yet due to 'state' not being set */ | 645 | * pressed yet due to 'state' not being set */ |
644 | // _device_modifiers_update(dev); | 646 | // _device_modifiers_update(dev); |
645 | ev->modifiers = edev->xkb.modifiers; | 647 | // ev->modifiers = edev->xkb.modifiers; |
648 | ev->modifiers = 0; | ||
646 | 649 | ||
647 | ev->x = edev->mouse.x; | 650 | ev->x = edev->mouse.x; |
648 | ev->y = edev->mouse.y; | 651 | ev->y = edev->mouse.y; |
@@ -670,8 +673,6 @@ _device_handle_touch_up(struct libinput_device *device, struct libinput_event_to | |||
670 | 673 | ||
671 | if (!(edev = libinput_device_get_user_data(device))) return; | 674 | if (!(edev = libinput_device_get_user_data(device))) return; |
672 | 675 | ||
673 | /* edev->mouse.x = 0; */ | ||
674 | /* edev->mouse.y = 0; */ | ||
675 | edev->mt_slot = libinput_event_touch_get_seat_slot(event); | 676 | edev->mt_slot = libinput_event_touch_get_seat_slot(event); |
676 | 677 | ||
677 | _device_handle_touch_event(edev, event, ECORE_EVENT_MOUSE_BUTTON_UP); | 678 | _device_handle_touch_event(edev, event, ECORE_EVENT_MOUSE_BUTTON_UP); |
@@ -706,8 +707,6 @@ _ecore_drm_evdev_event_process(struct libinput_event *event) | |||
706 | struct libinput_device *device; | 707 | struct libinput_device *device; |
707 | Eina_Bool ret = EINA_TRUE; | 708 | Eina_Bool ret = EINA_TRUE; |
708 | 709 | ||
709 | /* TODO: Finish Touch Events */ | ||
710 | |||
711 | device = libinput_event_get_device(event); | 710 | device = libinput_event_get_device(event); |
712 | switch (libinput_event_get_type(event)) | 711 | switch (libinput_event_get_type(event)) |
713 | { | 712 | { |