From: duna.oh Date: Thu, 11 May 2023 08:30:49 +0000 (+0900) Subject: e_input: add checking TOUCH capability in e_input_device_pointer_xy_get() X-Git-Tag: accepted/tizen/unified/20230605.170338~119 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f78e8929de0d94885804fdb2117048a1af84e12;hp=e808ca5a899cc67b6a90ba7102759d2f695e4912;p=platform%2Fupstream%2Fenlightenment.git e_input: add checking TOUCH capability in e_input_device_pointer_xy_get() seat->ptr.x/y could be updated by TOUCH or POINTER device. This patch fixes the bug that if no POINTER device is attached, user couldn't get the right values of ptr.x/y. Change-Id: I9a8c7b708882a30a81a02db6ad6f4d2a4a87aed8 --- diff --git a/src/bin/e_input_device.c b/src/bin/e_input_device.c index 9833e7a..a3f8828 100644 --- a/src/bin/e_input_device.c +++ b/src/bin/e_input_device.c @@ -300,8 +300,8 @@ e_input_device_pointer_xy_get(E_Input_Device *dev, int *x, int *y) { EINA_LIST_FOREACH(seat->devices, ll, edev) { - if (!libinput_device_has_capability(edev->device, - LIBINPUT_DEVICE_CAP_POINTER)) + if (!(edev->caps & E_INPUT_SEAT_POINTER || + edev->caps & E_INPUT_SEAT_TOUCH)) continue; if (x) *x = seat->ptr.dx;