summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-20 11:28:48 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-20 11:30:33 -0400
commit9ecc3ba38d0b61dcefe9e2e32fc59f8835679df0 (patch)
tree6afb8291ce3c4f322a0ab8a68015a3df8d64ee65
parent6dcc2e6cc4adfcc9ef1a14e2d375358fd8d12abc (diff)
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.c13
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)
643 else if (y >= ptr->miny + ptr->maxh) 643 else if (y >= ptr->miny + ptr->maxh)
644 y = ptr->miny + ptr->maxh - 1; 644 y = ptr->miny + ptr->maxh - 1;
645 645
646 ptr->x = x;
647 ptr->y = y;
648
646 ev->window = edev->window; 649 ev->window = edev->window;
647 ev->event_window = edev->window; 650 ev->event_window = edev->window;
648 ev->root_window = edev->window; 651 ev->root_window = edev->window;
649 ev->timestamp = ptr->timestamp; 652 ev->timestamp = ptr->timestamp;
650 ev->same_screen = 1; 653 ev->same_screen = 1;
651 654
652 ev->x = x; 655 ev->x = ptr->x;
653 ev->y = y; 656 ev->y = ptr->y;
654 ev->root.x = x; 657 ev->root.x = ptr->x;
655 ev->root.y = y; 658 ev->root.y = ptr->y;
656 659
657 kbd = _evdev_keyboard_get(edev->seat); 660 kbd = _evdev_keyboard_get(edev->seat);
658 if (kbd) _keyboard_modifiers_update(kbd, edev->seat); 661 if (kbd) _keyboard_modifiers_update(kbd, edev->seat);
@@ -1132,7 +1135,7 @@ _evdev_device_calibrate(Elput_Device *dev)
1132 if ((w == 0) || (h == 0)) return; 1135 if ((w == 0) || (h == 0)) return;
1133 1136
1134 if ((!libinput_device_config_calibration_has_matrix(dev->device)) || 1137 if ((!libinput_device_config_calibration_has_matrix(dev->device)) ||
1135 (libinput_device_config_calibration_get_default_matrix(dev->device, cal))) 1138 (libinput_device_config_calibration_get_default_matrix(dev->device, cal) != 0))
1136 return; 1139 return;
1137 1140
1138 sysname = libinput_device_get_sysname(dev->device); 1141 sysname = libinput_device_get_sysname(dev->device);