summaryrefslogtreecommitdiff
path: root/src/lib/elput
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-01-17 11:34:24 -0500
committerChris Michael <cp.michael@samsung.com>2017-01-17 11:36:50 -0500
commit2af4858e2aad8cffac7248398786d37df1a29845 (patch)
treebd09b8df6831ce323871aa129071051d25533879 /src/lib/elput
parentbbdfe393e4bf5aee5d00dacb704b0e7510921ecd (diff)
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>
Diffstat (limited to 'src/lib/elput')
-rw-r--r--src/lib/elput/elput_input.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c
index 1dde85aa88..706e4f7567 100644
--- a/src/lib/elput/elput_input.c
+++ b/src/lib/elput/elput_input.c
@@ -425,6 +425,16 @@ elput_input_pointer_xy_get(Elput_Manager *manager, const char *seat, int *x, int
425 continue; 425 continue;
426 if (x) *x = eseat->ptr->x; 426 if (x) *x = eseat->ptr->x;
427 if (y) *y = eseat->ptr->y; 427 if (y) *y = eseat->ptr->y;
428 return;
429 }
430
431 EINA_LIST_FOREACH(manager->input.seats, l, eseat)
432 {
433 if (!eseat->touch) continue;
434 if ((eseat->name) && (strcmp(eseat->name, seat)))
435 continue;
436 if (x) *x = eseat->touch->x;
437 if (y) *y = eseat->touch->y;
428 break; 438 break;
429 } 439 }
430} 440}