EAPI void ecore_drm_device_pointer_xy_get(Ecore_Drm_Device *dev, int *x, int *y);
/**
+ * Warp the pointer position of Ecore_Drm_Device
+ *
+ * This function will set the pointer position of Ecore_Drm_Device
+ *
+ * @param dev The Ecore_Drm_Device to set pointer position for
+ * @param x The new x co-ordinate
+ * @param y The new y co-ordinate
+ *
+ * @ingroup Ecore_Drm_Device_Group
+ * @since 1.18
+ */
+EAPI void ecore_drm_device_pointer_warp(Ecore_Drm_Device *dev, int x, int y);
+
+/**
* Get the list of drm devices which are allocated.
*
* @return Eina_List of drm devices, NULL otherwise
}
}
+EAPI void
+ecore_drm_device_pointer_warp(Ecore_Drm_Device *dev, int x, int y)
+{
+ Ecore_Drm_Seat *seat;
+ Ecore_Drm_Evdev *edev;
+ Eina_List *l, *ll;
+
+ /* check for valid device */
+ EINA_SAFETY_ON_TRUE_RETURN((!dev) || (dev->drm.fd < 0));
+ EINA_LIST_FOREACH(dev->seats, l, seat)
+ {
+ EINA_LIST_FOREACH(seat->devices, ll, edev)
+ {
+ if (!libinput_device_has_capability(edev->device,
+ LIBINPUT_DEVICE_CAP_POINTER))
+ continue;
+
+ seat->ptr.dx = seat->ptr.ix = x;
+ seat->ptr.dy = seat->ptr.iy = y;
+ _ecore_drm_pointer_motion_post(edev);
+ }
+ }
+}
+
EAPI Eina_Bool
ecore_drm_device_software_setup(Ecore_Drm_Device *dev)
{
ev->window = (Ecore_Window)input->dev->window;
ev->event_window = (Ecore_Window)input->dev->window;
ev->root_window = (Ecore_Window)input->dev->window;
- ev->timestamp = libinput_event_pointer_get_time(event);
+ if (event) ev->timestamp = libinput_event_pointer_get_time(event);
ev->same_screen = 1;
_device_modifiers_update(edev);
ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL);
}
+void
+_ecore_drm_pointer_motion_post(Ecore_Drm_Evdev *edev)
+{
+ _device_pointer_motion(edev, NULL);
+}
+
static void
_device_handle_pointer_motion(struct libinput_device *device, struct libinput_event_pointer *event)
{
Ecore_Drm_Evdev *_ecore_drm_evdev_device_create(Ecore_Drm_Seat *seat, struct libinput_device *device);
void _ecore_drm_evdev_device_destroy(Ecore_Drm_Evdev *evdev);
Eina_Bool _ecore_drm_evdev_event_process(struct libinput_event *event);
+void _ecore_drm_pointer_motion_post(Ecore_Drm_Evdev *evdev);
Ecore_Drm_Fb *_ecore_drm_fb_create(Ecore_Drm_Device *dev, int width, int height);
void _ecore_drm_fb_destroy(Ecore_Drm_Fb *fb);