summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-03-04 11:47:42 -0500
committerChris Michael <cp.michael@samsung.com>2015-03-04 11:49:44 -0500
commit49beaeacf474d3743a39da75488be9befa4a09b3 (patch)
tree0bc886cdcd7155098e2a5a5ed5d0df3bb7392704
parentaabf45071cedba9e4e61d5690fb4537f11590ad2 (diff)
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 <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_drm/ecore_drm_evdev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c b/src/lib/ecore_drm/ecore_drm_evdev.c
index 3f471019ca..a8383fa5c6 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)
78 if (!(output = eina_list_nth(input->dev->outputs, 0))) return; 78 if (!(output = eina_list_nth(input->dev->outputs, 0))) return;
79 edev->output = output; 79 edev->output = output;
80 } 80 }
81
82 if (libinput_device_has_capability(edev->device,
83 LIBINPUT_DEVICE_CAP_POINTER))
84 {
85 edev->mouse.dx = edev->output->current_mode->width / 2;
86 edev->mouse.dy = edev->output->current_mode->height / 2;
87 }
81} 88}
82 89
83static void 90static void