pepper: Relative motion as default
authorTaekyun Kim <tkq.kim@samsung.com>
Wed, 16 Sep 2015 07:51:17 +0000 (16:51 +0900)
committerTaekyun Kim <tkq.kim@samsung.com>
Wed, 16 Sep 2015 08:09:01 +0000 (17:09 +0900)
Absolute motion event should use PEPPER_EVENT_POINTER_MOTION_ABSOLUTE

Change-Id: I0840b1ccd704ad45eecaa380bd7b4c09e50799dc

src/lib/libinput/libinput.c
src/lib/pepper/pepper.h
src/lib/x11/x11-input.c

index b733887..6fc49ef 100644 (file)
@@ -193,13 +193,12 @@ pointer_motion(struct libinput_device *libinput_device,
     li_device_t            *device = libinput_device_get_user_data(libinput_device);
     pepper_input_event_t    event;
 
-    event.id = PEPPER_EVENT_POINTER_MOTION_RELATIVE;
+    event.id = PEPPER_EVENT_POINTER_MOTION;
     event.time = libinput_event_pointer_get_time(pointer_event);
     event.x = libinput_event_pointer_get_dx(pointer_event);
     event.y = libinput_event_pointer_get_dy(pointer_event);
 
-    pepper_object_emit_event((pepper_object_t *)device->base,
-                             PEPPER_EVENT_POINTER_MOTION_RELATIVE, &event);
+    pepper_object_emit_event((pepper_object_t *)device->base, PEPPER_EVENT_POINTER_MOTION, &event);
 }
 
 static void
@@ -214,7 +213,8 @@ pointer_motion_absolute(struct libinput_device *libinput_device,
     event.x = libinput_event_pointer_get_absolute_x_transformed(pointer_event, 1);
     event.y = libinput_event_pointer_get_absolute_y_transformed(pointer_event, 1);
 
-    pepper_object_emit_event((pepper_object_t *)device->base, PEPPER_EVENT_POINTER_MOTION, &event);
+    pepper_object_emit_event((pepper_object_t *)device->base,
+                             PEPPER_EVENT_POINTER_MOTION_ABSOLUTE, &event);
 }
 
 static void
index aef2aa8..c38057c 100644 (file)
@@ -122,7 +122,7 @@ enum pepper_built_in_events
     PEPPER_EVENT_POINTER_ENTER,
     PEPPER_EVENT_POINTER_LEAVE,
     PEPPER_EVENT_POINTER_MOTION,
-    PEPPER_EVENT_POINTER_MOTION_RELATIVE,
+    PEPPER_EVENT_POINTER_MOTION_ABSOLUTE,
     PEPPER_EVENT_POINTER_BUTTON,
     PEPPER_EVENT_POINTER_AXIS,
 
index 1e14a1f..2a21039 100644 (file)
@@ -96,13 +96,13 @@ x11_handle_input_event(x11_seat_t* seat, uint32_t type, xcb_generic_event_t* xev
         {
             xcb_motion_notify_event_t *motion = (xcb_motion_notify_event_t *)xev;
 
-            event.id   = PEPPER_EVENT_POINTER_MOTION;
+            event.id   = PEPPER_EVENT_POINTER_MOTION_ABSOLUTE;
             event.time = motion->time;
             event.x    = motion->event_x;
             event.y    = motion->event_y;
 
             pepper_object_emit_event((pepper_object_t *)seat->pointer,
-                                     PEPPER_EVENT_POINTER_MOTION, &event);
+                                     PEPPER_EVENT_POINTER_MOTION_ABSOLUTE, &event);
         }
         break;
     default :