devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=49beaeacf474d3743a39da75488be9befa4a09b3

commit 49beaeacf474d3743a39da75488be9befa4a09b3
Author: Chris Michael <[email protected]>
Date:   Wed Mar 4 11:47:42 2015 -0500

    ecore-drm: Center mouse pointer on an output when it gets created
    
    Summary: This sets the initial mouse pointer position to be at the
    center of an output.
    
    @fix
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_drm/ecore_drm_evdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c 
b/src/lib/ecore_drm/ecore_drm_evdev.c
index 3f47101..a8383fa 100644
--- a/src/lib/ecore_drm/ecore_drm_evdev.c
+++ b/src/lib/ecore_drm/ecore_drm_evdev.c
@@ -78,6 +78,13 @@ _device_output_set(Ecore_Drm_Evdev *edev)
         if (!(output = eina_list_nth(input->dev->outputs, 0))) return;
         edev->output = output;
      }
+
+   if (libinput_device_has_capability(edev->device, 
+                                      LIBINPUT_DEVICE_CAP_POINTER))
+     {
+        edev->mouse.dx = edev->output->current_mode->width / 2;
+        edev->mouse.dy = edev->output->current_mode->height / 2;
+     }
 }
 
 static void 

-- 


Reply via email to