summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm_device.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-01-25 16:20:18 -0600
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-18 15:50:16 -0500
commitddc6962d775345ccb0eb4590486693efb3564075 (patch)
treef5679ecbde74256667077b0c607dea9ebe036144 /src/lib/ecore_drm/ecore_drm_device.c
parent4e953ecc4d83dae0f4360e1cb413a2a878617603 (diff)
ecore_drm: Add pointer warping API
Adds a new API: ecore_drm_device_pointer_warp() which warps the pointer to the specified location. All libinput seats with pointers are warped.
Diffstat (limited to 'src/lib/ecore_drm/ecore_drm_device.c')
-rw-r--r--src/lib/ecore_drm/ecore_drm_device.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_device.c b/src/lib/ecore_drm/ecore_drm_device.c
index 16a7843cd6..95117d2b9d 100644
--- a/src/lib/ecore_drm/ecore_drm_device.c
+++ b/src/lib/ecore_drm/ecore_drm_device.c
@@ -509,6 +509,30 @@ ecore_drm_device_pointer_xy_get(Ecore_Drm_Device *dev, int *x, int *y)
509 } 509 }
510} 510}
511 511
512EAPI void
513ecore_drm_device_pointer_warp(Ecore_Drm_Device *dev, int x, int y)
514{
515 Ecore_Drm_Seat *seat;
516 Ecore_Drm_Evdev *edev;
517 Eina_List *l, *ll;
518
519 /* check for valid device */
520 EINA_SAFETY_ON_TRUE_RETURN((!dev) || (dev->drm.fd < 0));
521 EINA_LIST_FOREACH(dev->seats, l, seat)
522 {
523 EINA_LIST_FOREACH(seat->devices, ll, edev)
524 {
525 if (!libinput_device_has_capability(edev->device,
526 LIBINPUT_DEVICE_CAP_POINTER))
527 continue;
528
529 seat->ptr.dx = seat->ptr.ix = x;
530 seat->ptr.dy = seat->ptr.iy = y;
531 _ecore_drm_pointer_motion_post(edev);
532 }
533 }
534}
535
512EAPI Eina_Bool 536EAPI Eina_Bool
513ecore_drm_device_software_setup(Ecore_Drm_Device *dev) 537ecore_drm_device_software_setup(Ecore_Drm_Device *dev)
514{ 538{