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>
This commit is contained in:
Chris Michael 2015-03-04 11:47:42 -05:00
parent aabf45071c
commit 49beaeacf4
1 changed files with 7 additions and 0 deletions

View File

@ -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