devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5d767aff32e42040da0dd6a5c4d70cff7139e1b2

commit 5d767aff32e42040da0dd6a5c4d70cff7139e1b2
Author: Chris Michael <[email protected]>
Date:   Wed Dec 10 12:01:16 2014 -0500

    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 <[email protected]>
---
 src/lib/ecore_drm/ecore_drm_evdev.c | 11 +++++------
 1 file 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 fbcb9de..3339771 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
         edev->mouse.prev_button = button;
      }
 
-   ev->buttons = button;
+   ev->buttons = ((button & 0x00F) + 1);
 
    if (edev->mouse.did_double)
      ev->double_click = 1;
@@ -610,6 +610,7 @@ _device_handle_touch_down(struct libinput_device *device, 
struct libinput_event_
      libinput_event_touch_get_x_transformed(event, edev->output.w);
    edev->mouse.y = 
      libinput_event_touch_get_y_transformed(event, edev->output.h);
+
    edev->mt_slot = libinput_event_touch_get_seat_slot(event);
 
    _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
      libinput_event_touch_get_x_transformed(event, edev->output.w);
    edev->mouse.y = 
      libinput_event_touch_get_y_transformed(event, edev->output.h);
+
    edev->mt_slot = libinput_event_touch_get_seat_slot(event);
 
    ev->window = (Ecore_Window)input->dev->window;
@@ -642,7 +644,8 @@ _device_handle_touch_motion(struct libinput_device *device, 
struct libinput_even
    /* NB: Commented out. This borks mouse movement if no key has been 
     * pressed yet due to 'state' not being set */
 //   _device_modifiers_update(dev);
-   ev->modifiers = edev->xkb.modifiers;
+//   ev->modifiers = edev->xkb.modifiers;
+   ev->modifiers = 0;
 
    ev->x = edev->mouse.x;
    ev->y = edev->mouse.y;
@@ -670,8 +673,6 @@ _device_handle_touch_up(struct libinput_device *device, 
struct libinput_event_to
 
    if (!(edev = libinput_device_get_user_data(device))) return;
 
-   /* edev->mouse.x = 0; */
-   /* edev->mouse.y = 0; */
    edev->mt_slot = libinput_event_touch_get_seat_slot(event);
 
    _device_handle_touch_event(edev, event, ECORE_EVENT_MOUSE_BUTTON_UP);
@@ -706,8 +707,6 @@ _ecore_drm_evdev_event_process(struct libinput_event *event)
    struct libinput_device *device;
    Eina_Bool ret = EINA_TRUE;
 
-   /* TODO: Finish Touch Events */
-
    device = libinput_event_get_device(event);
    switch (libinput_event_get_type(event))
      {

-- 


Reply via email to