diff options
author | Chris Michael <cpmichael@osg.samsung.com> | 2016-05-20 11:28:48 -0400 |
---|---|---|
committer | Chris Michael <cpmichael@osg.samsung.com> | 2016-05-20 11:30:33 -0400 |
commit | 9ecc3ba38d0b61dcefe9e2e32fc59f8835679df0 (patch) | |
tree | 6afb8291ce3c4f322a0ab8a68015a3df8d64ee65 | |
parent | 6dcc2e6cc4adfcc9ef1a14e2d375358fd8d12abc (diff) | |
download | efl-9ecc3ba38d0b61dcefe9e2e32fc59f8835679df0.tar.gz |
elput: Check return of calibration_get_default_matrix function
We should be checking the return value when we try to get the default
matrix calibration for an input device so we can fail properly
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
-rw-r--r-- | src/lib/elput/elput_evdev.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c index 477dc05aea..45370197df 100644 --- a/src/lib/elput/elput_evdev.c +++ b/src/lib/elput/elput_evdev.c @@ -643,16 +643,19 @@ _pointer_motion_send(Elput_Device *edev) else if (y >= ptr->miny + ptr->maxh) y = ptr->miny + ptr->maxh - 1; + ptr->x = x; + ptr->y = y; + ev->window = edev->window; ev->event_window = edev->window; ev->root_window = edev->window; ev->timestamp = ptr->timestamp; ev->same_screen = 1; - ev->x = x; - ev->y = y; - ev->root.x = x; - ev->root.y = y; + ev->x = ptr->x; + ev->y = ptr->y; + ev->root.x = ptr->x; + ev->root.y = ptr->y; kbd = _evdev_keyboard_get(edev->seat); if (kbd) _keyboard_modifiers_update(kbd, edev->seat); @@ -1132,7 +1135,7 @@ _evdev_device_calibrate(Elput_Device *dev) if ((w == 0) || (h == 0)) return; if ((!libinput_device_config_calibration_has_matrix(dev->device)) || - (libinput_device_config_calibration_get_default_matrix(dev->device, cal))) + (libinput_device_config_calibration_get_default_matrix(dev->device, cal) != 0)) return; sysname = libinput_device_get_sysname(dev->device); |