forked from enlightenment/efl
elput: Return touch coordinates when we have no pointer
If a user calls elput_input_pointer_xy_get (as is done via ecore_evas_drm) and a pointer does not exist, we never return any coordinates for this function. Enlightenment is using ecore_evas_pointer_xy_get (which when using the drm ee, ends up calling elput_input_pointer_xy_get). If we have no pointer device, then no coordinates are ever returned and touch clicking does not function properly. To fix that we will check if a touch device exists and supply the coordinates from that (in the case where there is no pointer device). @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
bbdfe393e4
commit
2af4858e2a
|
@ -425,6 +425,16 @@ elput_input_pointer_xy_get(Elput_Manager *manager, const char *seat, int *x, int
|
|||
continue;
|
||||
if (x) *x = eseat->ptr->x;
|
||||
if (y) *y = eseat->ptr->y;
|
||||
return;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(manager->input.seats, l, eseat)
|
||||
{
|
||||
if (!eseat->touch) continue;
|
||||
if ((eseat->name) && (strcmp(eseat->name, seat)))
|
||||
continue;
|
||||
if (x) *x = eseat->touch->x;
|
||||
if (y) *y = eseat->touch->y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue