ChangeLog | 172 ++++++++ configure.ac | 4 debian/changelog | 12 debian/control | 2 debian/patches/0001-configure.ac-Fix-udev-libudev-dependency.patch | 31 - debian/patches/0002-default-resolution.patch | 40 - debian/patches/0003-copy-mt-vals.patch | 203 ---------- debian/patches/100-evdev-force-x-y-axes.patch | 92 ---- debian/patches/series | 4 src/evdev.c | 192 +++++++-- src/evdev.h | 2 src/udev.c | 69 --- 12 files changed, 344 insertions(+), 479 deletions(-)
New commits: commit c7824b4fa36c3f6b28bb3632d8939be01106a997 Author: Chase Douglas <chase.doug...@canonical.com> Date: Fri Feb 10 18:08:14 2012 -0800 releasing version 1:2.6.99.901+git20120126-0ubuntu1 diff --git a/configure.ac b/configure.ac index 47f70b4..f72cae3 100644 --- a/configure.ac +++ b/configure.ac @@ -48,7 +48,7 @@ XORG_DEFAULT_OPTIONS PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto inputproto) PKG_CHECK_MODULES(UDEV, libudev) -PKG_CHECK_MODULES(XI22, [inputproto >= 2.1.99.3] [xorg-server >= 1.11.99.901], HAVE_XI22="yes", HAVE_XI22="no") +PKG_CHECK_MODULES(XI22, [inputproto >= 2.1.99.3] [xorg-server >= 1.11.3], HAVE_XI22="yes", HAVE_XI22="no") if test "x$HAVE_XI22" = xyes; then # Obtain compiler/linker options for mtdev diff --git a/debian/changelog b/debian/changelog index 011feaf..44e6ea1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -xserver-xorg-input-evdev (1:2.6.99.901+git20120126-0ubuntu1) UNRELEASED; urgency=low +xserver-xorg-input-evdev (1:2.6.99.901+git20120126-0ubuntu1) precise; urgency=low * Update to latest git snapshot (224a28d) * Drop patches merged upstream: @@ -8,7 +8,7 @@ xserver-xorg-input-evdev (1:2.6.99.901+git20120126-0ubuntu1) UNRELEASED; urgency - 100-evdev-force-x-y-axes.patch * Bump standards version to 3.9.2 - -- Chase Douglas <chase.doug...@ubuntu.com> Fri, 10 Feb 2012 18:06:42 -0800 + -- Chase Douglas <chase.doug...@ubuntu.com> Fri, 10 Feb 2012 18:08:07 -0800 xserver-xorg-input-evdev (1:2.6.99.901-1ubuntu3) precise; urgency=low commit e9601ab9f3a770a4eb3c8c26d479fdf510137e37 Author: Chase Douglas <chase.doug...@canonical.com> Date: Fri Feb 10 18:06:53 2012 -0800 Bump standards version to 3.9.2 diff --git a/debian/changelog b/debian/changelog index d85b8ec..011feaf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,8 +6,9 @@ xserver-xorg-input-evdev (1:2.6.99.901+git20120126-0ubuntu1) UNRELEASED; urgency - 0002-default-resolution.patch - 0003-copy-mt-vals.patch - 100-evdev-force-x-y-axes.patch + * Bump standards version to 3.9.2 - -- Chase Douglas <chase.doug...@ubuntu.com> Fri, 10 Feb 2012 17:10:46 -0800 + -- Chase Douglas <chase.doug...@ubuntu.com> Fri, 10 Feb 2012 18:06:42 -0800 xserver-xorg-input-evdev (1:2.6.99.901-1ubuntu3) precise; urgency=low diff --git a/debian/control b/debian/control index c6ffb8e..de451b0 100644 --- a/debian/control +++ b/debian/control @@ -18,7 +18,7 @@ Build-Depends: xutils-dev (>= 1:7.5+4), libudev-dev, libmtdev-dev, -Standards-Version: 3.9.1 +Standards-Version: 3.9.2 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-input-evdev Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-input-evdev.git commit fb89d739390a5201da2a232037f2355d515dff64 Author: Chase Douglas <chase.doug...@canonical.com> Date: Fri Feb 10 17:11:47 2012 -0800 Drop patches merged upstream: * Drop patches merged upstream: - 0001-configure.ac-Fix-udev-libudev-dependency.patch - 0002-default-resolution.patch - 0003-copy-mt-vals.patch - 100-evdev-force-x-y-axes.patch diff --git a/debian/changelog b/debian/changelog index c4cedff..d85b8ec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,13 @@ xserver-xorg-input-evdev (1:2.6.99.901+git20120126-0ubuntu1) UNRELEASED; urgency=low * Update to latest git snapshot (224a28d) + * Drop patches merged upstream: + - 0001-configure.ac-Fix-udev-libudev-dependency.patch + - 0002-default-resolution.patch + - 0003-copy-mt-vals.patch + - 100-evdev-force-x-y-axes.patch - -- Chase Douglas <chase.doug...@ubuntu.com> Fri, 10 Feb 2012 17:02:27 -0800 + -- Chase Douglas <chase.doug...@ubuntu.com> Fri, 10 Feb 2012 17:10:46 -0800 xserver-xorg-input-evdev (1:2.6.99.901-1ubuntu3) precise; urgency=low diff --git a/debian/patches/0001-configure.ac-Fix-udev-libudev-dependency.patch b/debian/patches/0001-configure.ac-Fix-udev-libudev-dependency.patch deleted file mode 100644 index b3fb246..0000000 --- a/debian/patches/0001-configure.ac-Fix-udev-libudev-dependency.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 6f639c450c513c44b6eb7ddfd31e207ca83bcd39 Mon Sep 17 00:00:00 2001 -From: Cyril Brulebois <k...@debian.org> -Date: Sat, 31 Dec 2011 19:35:17 +0100 -Subject: [PATCH:xf86-input-evdev 1/2] configure.ac: Fix udev/libudev - dependency. - -In 683a55e504f4fc2d1c847c54986439a0c61b2f20, a dependency on libudev was -added, but documented in configure.ac as a dependency on udev (which -also happens to ship a pkg-config file). - -Signed-off-by: Cyril Brulebois <k...@debian.org> ---- - configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 57690c4..47f70b4 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -46,7 +46,7 @@ XORG_DEFAULT_OPTIONS - - # Obtain compiler/linker options from server and required extensions - PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto inputproto) --PKG_CHECK_MODULES(UDEV, udev) -+PKG_CHECK_MODULES(UDEV, libudev) - - PKG_CHECK_MODULES(XI22, [inputproto >= 2.1.99.3] [xorg-server >= 1.11.99.901], HAVE_XI22="yes", HAVE_XI22="no") - --- -1.7.7.3 - diff --git a/debian/patches/0002-default-resolution.patch b/debian/patches/0002-default-resolution.patch deleted file mode 100644 index 7ebe0ac..0000000 --- a/debian/patches/0002-default-resolution.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 8c55e94a6ac91fa856d37206c8a7eda1adcc6b9d Mon Sep 17 00:00:00 2001 -From: Chase Douglas <chase.doug...@canonical.com> -Date: Tue, 03 Jan 2012 23:31:43 +0000 -Subject: Set the default resolution to 0 - -If we don't know the resolution, set it to 0. This is invalid, and tells -the X client that we don't know the resolution, rather than reporting an -incorrect value. - -This value was originally from commit -6271494faa4c45f4fa10509f72e0515f2cef36c6, which is the initial commit -from Adam Jackson adding absolute axis support. - -Signed-off-by: Chase Douglas <chase.doug...@canonical.com> -Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> ---- -diff --git a/src/evdev.c b/src/evdev.c -index 9f3a22a..82cdb00 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1323,7 +1323,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) - - for (axis = ABS_X; axis < ABS_MT_SLOT; axis++) { - int axnum = pEvdev->axis_map[axis]; -- int resolution = 10000; -+ int resolution = 0; - - if (axnum == -1) - continue; -@@ -1345,7 +1345,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) - #ifdef MULTITOUCH - for (axis = ABS_MT_TOUCH_MAJOR; axis <= ABS_MAX; axis++) { - int axnum = pEvdev->axis_map[axis]; -- int resolution = 10000; -+ int resolution = 0; - int j; - BOOL skip = FALSE; - --- -cgit v0.9.0.2-2-gbebe diff --git a/debian/patches/0003-copy-mt-vals.patch b/debian/patches/0003-copy-mt-vals.patch deleted file mode 100644 index e28a825..0000000 --- a/debian/patches/0003-copy-mt-vals.patch +++ /dev/null @@ -1,203 +0,0 @@ -From 93051a1a76c16f39193b3a4be72f5696b339e653 Mon Sep 17 00:00:00 2001 -From: Chase Douglas <chase.doug...@canonical.com> -Date: Tue, 3 Jan 2012 17:08:05 -0800 -Subject: [PATCH v2 xf86-input-evdev] Copy last valuator values into new touch valuator masks - -Evdev is a 100% stateful protocol. The following represents three -touches. Two touches begin and end at the same time at (500, 500) and -(1000, 1000). The third touch begins after the first two end, and is at -(500, 500). - -ABS_MT_SLOT 0 /* Set touch slot */ -ABS_MT_TRACKING_ID 0 /* New touch with ID 0 in slot 0 */ -ABS_MT_POSITION_X 500 /* Initial X position */ -ABS_MT_POSITION_Y 500 /* Initial Y position */ -ABS_MT_SLOT 1 /* Set touch slot */ -ABS_MT_TRACKING_ID 1 /* New touch with ID 1 in slot 1 */ -ABS_MT_POSITION_X 1000 /* Initial X position */ -ABS_MT_POSITION_Y 1000 /* Initial Y position */ -SYNC /* End of frame */ -ABS_MT_SLOT 0 /* Go back to slot 0 */ -ABS_MT_TRACKING_ID -1 /* Touch in slot 0 ended */ -ABS_MT_SLOT 1 /* Go to slot 1 */ -ABS_MT_TRACKING_ID -1 /* Touch in slot 1 ended */ -SYNC /* End of frame */ -ABS_MT_SLOT 0 /* Go back to slot 0 */ -ABS_MT_TRACKING_ID 2 /* New touch in slot 0 with ID 2 */ -SYNC /* End of frame */ -ABS_MT_TRACKING_ID -1 /* Touch in last slot (0) ended */ -SYNC /* End of frame */ - -Note that touch 2 has the same X and Y position as touch 0. This is -implied because no new value was emitted for slot 0. In fact, Linux will -not emit an event in the same slot with the same event type and code -unless the value has changed. Thus, we can only assume that all the MT -valuators have the same values as they were when they were last sent for -the given slot. - -This change adds an array of valuator mask to hold all the last valuator -values that came from evdev for each slot. When a new touch begins, all -the last values are copied into it. - -This patch assumes initial axis values of 0 in each slot. Linux and -mtdev do not provide a facility to query the current values of axes in -each slot yet. This may cause spurious incorrect touch valuator values -at the beginning of an X session, but there's nothing we can do about it -right now. - -Signed-off-by: Chase Douglas <chase.doug...@canonical.com> ---- -Changes since v1: -* Hold the last values *per-slot* instead of globally - - src/evdev.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- - src/evdev.h | 1 + - 2 files changed, 77 insertions(+), 4 deletions(-) - -diff --git a/src/evdev.c b/src/evdev.c -index 82cdb00..ec6650e 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -746,6 +746,24 @@ EvdevProcessTouch(InputInfoPtr pInfo) - valuator_mask_zero(pEvdev->mt_mask); - } - -+static int -+num_slots(EvdevPtr pEvdev) -+{ -+ int value = pEvdev->absinfo[ABS_MT_SLOT].maximum - -+ pEvdev->absinfo[ABS_MT_SLOT].minimum + 1; -+ -+ /* If we don't know how many slots there are, assume at least 10 */ -+ return value > 1 ? value : 10; -+} -+ -+static int -+last_mt_vals_slot(EvdevPtr pEvdev) -+{ -+ int value = pEvdev->cur_slot - pEvdev->absinfo[ABS_MT_SLOT].minimum; -+ -+ return value < num_slots(pEvdev) ? value : -1; -+} -+ - static void - EvdevProcessTouchEvent(InputInfoPtr pInfo, struct input_event *ev) - { -@@ -757,16 +775,29 @@ EvdevProcessTouchEvent(InputInfoPtr pInfo, struct input_event *ev) - pEvdev->cur_slot = ev->value; - } else - { -+ int slot_index = last_mt_vals_slot(pEvdev); -+ - if (pEvdev->slot_state == SLOTSTATE_EMPTY) - pEvdev->slot_state = SLOTSTATE_UPDATE; - if (ev->code == ABS_MT_TRACKING_ID) { -- if (ev->value >= 0) -- pEvdev->slot_state = SLOTSTATE_OPEN; -- else -- pEvdev->slot_state = SLOTSTATE_CLOSE; -+ if (ev->value >= 0) { -+ pEvdev->slot_state = SLOTSTATE_OPEN; -+ -+ if (slot_index >= 0) -+ valuator_mask_copy(pEvdev->mt_mask, -+ pEvdev->last_mt_vals[slot_index]); -+ else -+ xf86IDrvMsg(pInfo, X_WARNING, -+ "Attempted to copy values from out-of-range " -+ "slot, touch events may be incorrect.\n"); -+ } else -+ pEvdev->slot_state = SLOTSTATE_CLOSE; - } else { - map = pEvdev->axis_map[ev->code]; - valuator_mask_set(pEvdev->mt_mask, map, ev->value); -+ if (slot_index >= 0) -+ valuator_mask_set(pEvdev->last_mt_vals[slot_index], map, -+ ev->value); - } - } - } -@@ -1256,6 +1287,24 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) - goto out; - } - -+ pEvdev->last_mt_vals = calloc(num_slots(pEvdev), sizeof(ValuatorMask *)); -+ if (!pEvdev->last_mt_vals) { -+ xf86Msg(X_ERROR, -+ "%s: failed to allocate MT last values mask array.\n", -+ device->name); -+ goto out; -+ } -+ -+ for (i = 0; i < num_slots(pEvdev); i++) { -+ pEvdev->last_mt_vals[i] = valuator_mask_new(num_mt_axes_total); -+ if (!pEvdev->last_mt_vals[i]) { -+ xf86Msg(X_ERROR, -+ "%s: failed to allocate MT last values mask.\n", -+ device->name); -+ goto out; -+ } -+ } -+ - for (i = 0; i < EVDEV_MAXQUEUE; i++) { - pEvdev->queue[i].touchMask = - valuator_mask_new(num_mt_axes_total); -@@ -1318,6 +1367,17 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) - device->name); - goto out; - } -+ -+ for (i = 0; i < num_slots(pEvdev); i++) { -+ for (axis = ABS_MT_TOUCH_MAJOR; axis < ABS_MAX; axis++) { -+ if (pEvdev->axis_map[axis] >= 0) { -+ /* XXX: read initial values from mtdev when it adds support -+ * for doing so. */ -+ valuator_mask_set(pEvdev->last_mt_vals[i], -+ pEvdev->axis_map[axis], 0); -+ } -+ } -+ } - } - #endif - -@@ -1428,6 +1488,12 @@ out: - valuator_mask_free(&pEvdev->prox); - #ifdef MULTITOUCH - valuator_mask_free(&pEvdev->mt_mask); -+ if (pEvdev->last_mt_vals) { -+ for (i = 0; i < num_slots(pEvdev); i++) -+ valuator_mask_free(&pEvdev->last_mt_vals[i]); -+ free(pEvdev->last_mt_vals); -+ pEvdev->last_mt_vals = NULL; -+ } - for (i = 0; i < EVDEV_MAXQUEUE; i++) - valuator_mask_free(&pEvdev->queue[i].touchMask); - #endif -@@ -1808,6 +1874,12 @@ EvdevProc(DeviceIntPtr device, int what) - valuator_mask_free(&pEvdev->prox); - #ifdef MULTITOUCH - valuator_mask_free(&pEvdev->mt_mask); -+ if (pEvdev->last_mt_vals) { -+ for (i = 0; i < num_slots(pEvdev); i++) -+ valuator_mask_free(&pEvdev->last_mt_vals[i]); -+ free(pEvdev->last_mt_vals); -+ pEvdev->last_mt_vals = NULL; -+ } - for (i = 0; i < EVDEV_MAXQUEUE; i++) - valuator_mask_free(&pEvdev->queue[i].touchMask); - if (pEvdev->mtdev) -diff --git a/src/evdev.h b/src/evdev.h -index 1713b89..309b215 100644 ---- a/src/evdev.h -+++ b/src/evdev.h -@@ -158,6 +158,7 @@ typedef struct { - ValuatorMask *old_vals; /* old values for calculating relative motion */ - ValuatorMask *prox; /* last values set while not in proximity */ - ValuatorMask *mt_mask; -+ ValuatorMask **last_mt_vals; - int cur_slot; - enum SlotState slot_state; - #ifdef MULTITOUCH --- -1.7.7.3 - diff --git a/debian/patches/100-evdev-force-x-y-axes.patch b/debian/patches/100-evdev-force-x-y-axes.patch deleted file mode 100644 index 7c096fa..0000000 --- a/debian/patches/100-evdev-force-x-y-axes.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 5c5b2c8db851df7921cedd888222a6630a007fd8 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer <peter.hutte...@who-t.net> -Date: Thu, 12 Jan 2012 01:03:30 +0000 -Subject: Force x/y axes to exist on devices with any other axes (#44655) - -Too much in the server relies on x/y to exist and to be axes 0 and 1. So if -any relative axes exist, initialize REL_X/Y or ABS_X/Y as well. - -For servers up to 1.11: a scrollwheel-only device now has relative axes -where it only had buttons before. - -For servers 1.12 or later: the device now has x/y in addition to the scroll -axes. - -X.Org Bug 44655 <http://bugs.freedesktop.org/show_bug.cgi?id=44655> - -Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> -Reviewed-by: Chase Douglas <chase.doug...@canonical.com> -Reviewed-by: Daniel Stone <dan...@fooishbar.org> ---- -diff --git a/src/evdev.c b/src/evdev.c -index 989a255..effac40 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -1958,6 +1958,38 @@ EvdevGrabDevice(InputInfoPtr pInfo, int grab, int ungrab) - return TRUE; - } - -+/** -+ * Some devices only have other axes (e.g. wheels), but we -+ * still need x/y for these. The server relies on devices having -+ * x/y as axes 0/1 and core/XI 1.x clients expect it too (#44655) -+ */ -+static void -+EvdevForceXY(InputInfoPtr pInfo, int mode) -+{ -+ EvdevPtr pEvdev = pInfo->private; -+ -+ xf86IDrvMsg(pInfo, X_INFO, "Forcing %s x/y axes to exist.\n", -+ (mode == Relative) ? "relative" : "absolute"); -+ -+ if (mode == Relative) -+ { -+ EvdevSetBit(pEvdev->rel_bitmask, REL_X); -+ EvdevSetBit(pEvdev->rel_bitmask, REL_Y); -+ } else if (mode == Absolute) -+ { -+ EvdevSetBit(pEvdev->abs_bitmask, ABS_X); -+ EvdevSetBit(pEvdev->abs_bitmask, ABS_Y); -+ pEvdev->absinfo[ABS_X].minimum = 0; -+ pEvdev->absinfo[ABS_X].maximum = 1000; -+ pEvdev->absinfo[ABS_X].value = 0; -+ pEvdev->absinfo[ABS_X].resolution = 0; -+ pEvdev->absinfo[ABS_Y].minimum = 0; -+ pEvdev->absinfo[ABS_Y].maximum = 1000; -+ pEvdev->absinfo[ABS_Y].value = 0; -+ pEvdev->absinfo[ABS_Y].resolution = 0; -+ } -+} -+ - static int - EvdevProbe(InputInfoPtr pInfo) - { -@@ -2051,7 +2083,8 @@ EvdevProbe(InputInfoPtr pInfo) - if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_X) && - EvdevBitIsSet(pEvdev->rel_bitmask, REL_Y)) { - xf86IDrvMsg(pInfo, X_PROBED, "Found x and y relative axes\n"); -- } -+ } else -+ EvdevForceXY(pInfo, Relative); - } else { - xf86IDrvMsg(pInfo, X_INFO, "Relative axes present but ignored.\n"); - has_rel_axes = FALSE; -@@ -2116,7 +2149,16 @@ EvdevProbe(InputInfoPtr pInfo) - pEvdev->flags |= EVDEV_TOUCHSCREEN; - pEvdev->flags |= EVDEV_BUTTON_EVENTS; - } -+ } else { -+#ifdef MULTITOUCH -+ if (!EvdevBitIsSet(pEvdev->abs_bitmask, ABS_MT_POSITION_X) || -+ !EvdevBitIsSet(pEvdev->abs_bitmask, ABS_MT_POSITION_Y)) -+#endif -+ EvdevForceXY(pInfo, Absolute); - } -+ -+ -+ - } - - for (i = 0; i < BTN_MISC; i++) { --- -cgit v0.9.0.2-2-gbebe diff --git a/debian/patches/series b/debian/patches/series index 6158d92..a25b353 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1 @@ -0001-configure.ac-Fix-udev-libudev-dependency.patch -0002-default-resolution.patch -0003-copy-mt-vals.patch 0004-xi22-ubuntu.patch -100-evdev-force-x-y-axes.patch commit 32fcfaa4ef6ead16132044831e1ab8182cac29ca Author: Chase Douglas <chase.doug...@canonical.com> Date: Fri Feb 10 17:03:45 2012 -0800 Update to latest git snapshot (224a28d) diff --git a/ChangeLog b/ChangeLog index 94ab5d0..5633ae6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,175 @@ +commit 224a28de25fda654040a9fd4e5c4d748c9e29809 +Author: Peter Hutterer <peter.hutte...@who-t.net> +Date: Wed Jan 25 16:03:34 2012 +1000 + + Only force REL_X/Y if no ABS_X/Y exists + + 5c5b2c8db851df7921cedd888222a6630a007fd8 added forced x/y axes if a device + has any axes of the same mode. This was too broad a brush, some devices have + a relative wheel but absolute x/y axes and would now get misdetected as + purely relative device. + + Only force relative axes if a device no rel x/y _and_ no abs x/y. + + Reproducible: virtual machine with QEMU USB Tablet will stop working + + Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> + Reviewed-by: Chase Douglas <chase.doug...@canonical.com> + +commit bc2f01ab838119a962f5e5eabb36e33d4c084f2c +Author: Chase Douglas <chase.doug...@canonical.com> +Date: Thu Jan 19 14:17:34 2012 -0800 + + Copy last valuator values into new touch valuator masks + + Evdev is a 100% stateful protocol. The following represents three + touches. Two touches begin and end at the same time at (500, 500) and + (1000, 1000). The third touch begins after the first two end, and is at + (500, 500). + + ABS_MT_SLOT 0 /* Set touch slot */ + ABS_MT_TRACKING_ID 0 /* New touch with ID 0 in slot 0 */ + ABS_MT_POSITION_X 500 /* Initial X position */ + ABS_MT_POSITION_Y 500 /* Initial Y position */ + ABS_MT_SLOT 1 /* Set touch slot */ + ABS_MT_TRACKING_ID 1 /* New touch with ID 1 in slot 1 */ + ABS_MT_POSITION_X 1000 /* Initial X position */ + ABS_MT_POSITION_Y 1000 /* Initial Y position */ + SYNC /* End of frame */ + ABS_MT_SLOT 0 /* Go back to slot 0 */ + ABS_MT_TRACKING_ID -1 /* Touch in slot 0 ended */ + ABS_MT_SLOT 1 /* Go to slot 1 */ + ABS_MT_TRACKING_ID -1 /* Touch in slot 1 ended */ + SYNC /* End of frame */ + ABS_MT_SLOT 0 /* Go back to slot 0 */ + ABS_MT_TRACKING_ID 2 /* New touch in slot 0 with ID 2 */ + SYNC /* End of frame */ + ABS_MT_TRACKING_ID -1 /* Touch in last slot (0) ended */ + SYNC /* End of frame */ + + Note that touch 2 has the same X and Y position as touch 0. This is + implied because no new value was emitted for slot 0. In fact, Linux will + not emit an event in the same slot with the same event type and code + unless the value has changed. Thus, we can only assume that all the MT + valuators have the same values as they were when they were last sent for + the given slot. + + This change adds an array of valuator mask to hold all the last valuator + values that came from evdev for each slot. When a new touch begins, all + the last values are copied into it. + + This patch assumes initial axis values of 0 in each slot. Linux and + mtdev do not provide a facility to query the current values of axes in + each slot yet. This may cause spurious incorrect touch valuator values + at the beginning of an X session, but there's nothing we can do about it + right now. + + Signed-off-by: Chase Douglas <chase.doug...@canonical.com> + Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> + +commit 9d9c9870c88f2c636799a68cde8efcab59a4a2a5 +Author: Peter Hutterer <peter.hutte...@who-t.net> +Date: Fri Jan 13 09:51:36 2012 +1000 + + Prefere relative axis labelling over absolute axis labelling + + If a device has both relative and absolute axes, we'd initialise the + relative axes but label them with the absolute labels. + + The current code is broken for mixed mode devices. Most of these devices + operate primarily in relative mode, but have some absolute axes available + for secondary functionality. For now, label the relative axes properly. We + can fix the absolute axes later. + + Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> + Reviewed-by: Chase Douglas <chase.doug...@canonical.com> + +commit 5c5b2c8db851df7921cedd888222a6630a007fd8 +Author: Peter Hutterer <peter.hutte...@who-t.net> +Date: Thu Jan 12 11:03:30 2012 +1000 + + Force x/y axes to exist on devices with any other axes (#44655) + + Too much in the server relies on x/y to exist and to be axes 0 and 1. So if + any relative axes exist, initialize REL_X/Y or ABS_X/Y as well. + + For servers up to 1.11: a scrollwheel-only device now has relative axes + where it only had buttons before. + + For servers 1.12 or later: the device now has x/y in addition to the scroll + axes. + + X.Org Bug 44655 <http://bugs.freedesktop.org/show_bug.cgi?id=44655> + + Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> + Reviewed-by: Chase Douglas <chase.doug...@canonical.com> + Reviewed-by: Daniel Stone <dan...@fooishbar.org> + +commit 854df75f4908bee66e1057f6f04817a1c47124bc +Author: Pete Beardmore <pete.beardm...@msn.com> +Date: Mon Jan 9 23:47:45 2012 +0000 + + missing multitouch related define tests + + addition of two missing define tests required when no multitouch related + symbols are available in user-space + + Fixes X.Org Bug 44578 <https://bugs.freedesktop.org/show_bug.cgi?id=44578> + + Signed-off-by: Pete Beardmore <pete.beardm...@msn.com> + Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> + +commit 8c55e94a6ac91fa856d37206c8a7eda1adcc6b9d +Author: Chase Douglas <chase.doug...@canonical.com> +Date: Tue Jan 3 15:31:43 2012 -0800 + + Set the default resolution to 0 + + If we don't know the resolution, set it to 0. This is invalid, and tells + the X client that we don't know the resolution, rather than reporting an + incorrect value. + + This value was originally from commit + 6271494faa4c45f4fa10509f72e0515f2cef36c6, which is the initial commit + from Adam Jackson adding absolute axis support. + + Signed-off-by: Chase Douglas <chase.doug...@canonical.com> + Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> + +commit 965338e9d0ee5e2a6135a930347e9dab4b8db0dd +Author: Peter Hutterer <peter.hutte...@who-t.net> +Date: Tue Jan 3 08:44:27 2012 +1000 + + Remove unused udev.c + + Added in 683a55e504f4fc2d1c847c54986439a0c61b2f20 due to a botched up + rebase -i. The contents of udev.c and EvdevIsVirtual are identical, there is + no need for an extra file for this one function. + + Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> + +commit 0075da20d691e451f32bdf3c8ba0f270a6c8b0e1 +Author: Cyril Brulebois <k...@debian.org> +Date: Sat Dec 31 19:46:08 2011 +0100 + + configure.ac: Fix udev/libudev dependency. + + In 683a55e504f4fc2d1c847c54986439a0c61b2f20, a dependency on libudev was + added, but documented in configure.ac as a dependency on udev (which + also happens to ship a pkg-config file). + + Signed-off-by: Cyril Brulebois <k...@debian.org> + Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> + +commit 009ac94a8e6d084c13f15ed8b2e1b22f86530c9f +Author: Jeremy Huddleston <jerem...@apple.com> +Date: Sat Dec 31 21:28:53 2011 -0500 + + Remove redundant redeclaration of Evdev3BEmuPreInit + + Found-by: Tinderbox + Signed-off-by: Jeremy Huddleston <jerem...@apple.com> + commit 4b76d80e934f5503c712289ce73d4e10cc79bba6 Author: Cyril Brulebois <k...@debian.org> Date: Sat Dec 31 18:38:30 2011 +0100 diff --git a/debian/changelog b/debian/changelog index f8f97a6..c4cedff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xserver-xorg-input-evdev (1:2.6.99.901+git20120126-0ubuntu1) UNRELEASED; urgency=low + + * Update to latest git snapshot (224a28d) + + -- Chase Douglas <chase.doug...@ubuntu.com> Fri, 10 Feb 2012 17:02:27 -0800 + xserver-xorg-input-evdev (1:2.6.99.901-1ubuntu3) precise; urgency=low * Add 100-evdev-force-x-y-axes.patch: Fixes lp: #921236 commit 224a28de25fda654040a9fd4e5c4d748c9e29809 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Wed Jan 25 16:03:34 2012 +1000 Only force REL_X/Y if no ABS_X/Y exists 5c5b2c8db851df7921cedd888222a6630a007fd8 added forced x/y axes if a device has any axes of the same mode. This was too broad a brush, some devices have a relative wheel but absolute x/y axes and would now get misdetected as purely relative device. Only force relative axes if a device no rel x/y _and_ no abs x/y. Reproducible: virtual machine with QEMU USB Tablet will stop working Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Chase Douglas <chase.doug...@canonical.com> diff --git a/src/evdev.c b/src/evdev.c index 32fe38b..d540b87 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2146,7 +2146,8 @@ EvdevProbe(InputInfoPtr pInfo) if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_X) && EvdevBitIsSet(pEvdev->rel_bitmask, REL_Y)) { xf86IDrvMsg(pInfo, X_PROBED, "Found x and y relative axes\n"); - } else + } else if (!EvdevBitIsSet(pEvdev->abs_bitmask, ABS_X) || + !EvdevBitIsSet(pEvdev->abs_bitmask, ABS_Y)) EvdevForceXY(pInfo, Relative); } else { xf86IDrvMsg(pInfo, X_INFO, "Relative axes present but ignored.\n"); commit bc2f01ab838119a962f5e5eabb36e33d4c084f2c Author: Chase Douglas <chase.doug...@canonical.com> Date: Thu Jan 19 14:17:34 2012 -0800 Copy last valuator values into new touch valuator masks Evdev is a 100% stateful protocol. The following represents three touches. Two touches begin and end at the same time at (500, 500) and (1000, 1000). The third touch begins after the first two end, and is at (500, 500). ABS_MT_SLOT 0 /* Set touch slot */ ABS_MT_TRACKING_ID 0 /* New touch with ID 0 in slot 0 */ ABS_MT_POSITION_X 500 /* Initial X position */ ABS_MT_POSITION_Y 500 /* Initial Y position */ ABS_MT_SLOT 1 /* Set touch slot */ ABS_MT_TRACKING_ID 1 /* New touch with ID 1 in slot 1 */ ABS_MT_POSITION_X 1000 /* Initial X position */ ABS_MT_POSITION_Y 1000 /* Initial Y position */ SYNC /* End of frame */ ABS_MT_SLOT 0 /* Go back to slot 0 */ ABS_MT_TRACKING_ID -1 /* Touch in slot 0 ended */ ABS_MT_SLOT 1 /* Go to slot 1 */ ABS_MT_TRACKING_ID -1 /* Touch in slot 1 ended */ SYNC /* End of frame */ ABS_MT_SLOT 0 /* Go back to slot 0 */ ABS_MT_TRACKING_ID 2 /* New touch in slot 0 with ID 2 */ SYNC /* End of frame */ ABS_MT_TRACKING_ID -1 /* Touch in last slot (0) ended */ SYNC /* End of frame */ Note that touch 2 has the same X and Y position as touch 0. This is implied because no new value was emitted for slot 0. In fact, Linux will not emit an event in the same slot with the same event type and code unless the value has changed. Thus, we can only assume that all the MT valuators have the same values as they were when they were last sent for the given slot. This change adds an array of valuator mask to hold all the last valuator values that came from evdev for each slot. When a new touch begins, all the last values are copied into it. This patch assumes initial axis values of 0 in each slot. Linux and mtdev do not provide a facility to query the current values of axes in each slot yet. This may cause spurious incorrect touch valuator values at the beginning of an X session, but there's nothing we can do about it right now. Signed-off-by: Chase Douglas <chase.doug...@canonical.com> Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/src/evdev.c b/src/evdev.c index 1cdba41..32fe38b 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -746,6 +746,24 @@ EvdevProcessTouch(InputInfoPtr pInfo) valuator_mask_zero(pEvdev->mt_mask); } +static int +num_slots(EvdevPtr pEvdev) +{ + int value = pEvdev->absinfo[ABS_MT_SLOT].maximum - + pEvdev->absinfo[ABS_MT_SLOT].minimum + 1; + + /* If we don't know how many slots there are, assume at least 10 */ + return value > 1 ? value : 10; +} + +static int +last_mt_vals_slot(EvdevPtr pEvdev) +{ + int value = pEvdev->cur_slot - pEvdev->absinfo[ABS_MT_SLOT].minimum; + + return value < num_slots(pEvdev) ? value : -1; +} + static void EvdevProcessTouchEvent(InputInfoPtr pInfo, struct input_event *ev) { @@ -757,16 +775,29 @@ EvdevProcessTouchEvent(InputInfoPtr pInfo, struct input_event *ev) pEvdev->cur_slot = ev->value; } else { + int slot_index = last_mt_vals_slot(pEvdev); + if (pEvdev->slot_state == SLOTSTATE_EMPTY) pEvdev->slot_state = SLOTSTATE_UPDATE; if (ev->code == ABS_MT_TRACKING_ID) { - if (ev->value >= 0) - pEvdev->slot_state = SLOTSTATE_OPEN; - else - pEvdev->slot_state = SLOTSTATE_CLOSE; + if (ev->value >= 0) { + pEvdev->slot_state = SLOTSTATE_OPEN; + + if (slot_index >= 0) + valuator_mask_copy(pEvdev->mt_mask, + pEvdev->last_mt_vals[slot_index]); + else + xf86IDrvMsg(pInfo, X_WARNING, + "Attempted to copy values from out-of-range " + "slot, touch events may be incorrect.\n"); + } else + pEvdev->slot_state = SLOTSTATE_CLOSE; } else { map = pEvdev->axis_map[ev->code]; valuator_mask_set(pEvdev->mt_mask, map, ev->value); + if (slot_index >= 0) + valuator_mask_set(pEvdev->last_mt_vals[slot_index], map, + ev->value); } } } @@ -1027,6 +1058,28 @@ EvdevProcessEvent(InputInfoPtr pInfo, struct input_event *ev) #undef ABS_Y_VALUE #undef ABS_VALUE +static void +EvdevFreeMasks(EvdevPtr pEvdev) +{ + int i; + + valuator_mask_free(&pEvdev->vals); + valuator_mask_free(&pEvdev->old_vals); + valuator_mask_free(&pEvdev->prox); +#ifdef MULTITOUCH + valuator_mask_free(&pEvdev->mt_mask); + if (pEvdev->last_mt_vals) + { + for (i = 0; i < num_slots(pEvdev); i++) + valuator_mask_free(&pEvdev->last_mt_vals[i]); + free(pEvdev->last_mt_vals); + pEvdev->last_mt_vals = NULL; + } + for (i = 0; i < EVDEV_MAXQUEUE; i++) + valuator_mask_free(&pEvdev->queue[i].touchMask); +#endif +} + /* just a magic number to reduce the number of reads */ #define NUM_EVENTS 16 @@ -1258,6 +1311,24 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) goto out; } + pEvdev->last_mt_vals = calloc(num_slots(pEvdev), sizeof(ValuatorMask *)); + if (!pEvdev->last_mt_vals) { + xf86IDrvMsg(pInfo, X_ERROR, + "%s: failed to allocate MT last values mask array.\n", + device->name); + goto out; + } + + for (i = 0; i < num_slots(pEvdev); i++) { + pEvdev->last_mt_vals[i] = valuator_mask_new(num_mt_axes_total); + if (!pEvdev->last_mt_vals[i]) { + xf86IDrvMsg(pInfo, X_ERROR, + "%s: failed to allocate MT last values mask.\n", + device->name); + goto out; + } + } + for (i = 0; i < EVDEV_MAXQUEUE; i++) { pEvdev->queue[i].touchMask = valuator_mask_new(num_mt_axes_total); @@ -1321,6 +1392,17 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) device->name); goto out; } + + for (i = 0; i < num_slots(pEvdev); i++) { + for (axis = ABS_MT_TOUCH_MAJOR; axis < ABS_MAX; axis++) { + if (pEvdev->axis_map[axis] >= 0) { + /* XXX: read initial values from mtdev when it adds support + * for doing so. */ + valuator_mask_set(pEvdev->last_mt_vals[i], + pEvdev->axis_map[axis], 0); + } + } + } } #endif @@ -1426,14 +1508,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) return Success; out: - valuator_mask_free(&pEvdev->vals); - valuator_mask_free(&pEvdev->old_vals); - valuator_mask_free(&pEvdev->prox); -#ifdef MULTITOUCH - valuator_mask_free(&pEvdev->mt_mask); - for (i = 0; i < EVDEV_MAXQUEUE; i++) - valuator_mask_free(&pEvdev->queue[i].touchMask); -#endif + EvdevFreeMasks(pEvdev); return !Success; } @@ -1767,9 +1842,6 @@ EvdevProc(DeviceIntPtr device, int what) { InputInfoPtr pInfo; EvdevPtr pEvdev; -#ifdef MULTITOUCH - int i; -#endif pInfo = device->public.devicePrivate; pEvdev = pInfo->private; @@ -1806,16 +1878,7 @@ EvdevProc(DeviceIntPtr device, int what) close(pInfo->fd); pInfo->fd = -1; } - valuator_mask_free(&pEvdev->vals); - valuator_mask_free(&pEvdev->old_vals); - valuator_mask_free(&pEvdev->prox); -#ifdef MULTITOUCH - valuator_mask_free(&pEvdev->mt_mask); - for (i = 0; i < EVDEV_MAXQUEUE; i++) - valuator_mask_free(&pEvdev->queue[i].touchMask); - if (pEvdev->mtdev) - mtdev_close(pEvdev->mtdev); -#endif + EvdevFreeMasks(pEvdev); EvdevRemoveDevice(pInfo); pEvdev->min_maj = 0; break; diff --git a/src/evdev.h b/src/evdev.h index 1713b89..309b215 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -158,6 +158,7 @@ typedef struct { ValuatorMask *old_vals; /* old values for calculating relative motion */ ValuatorMask *prox; /* last values set while not in proximity */ ValuatorMask *mt_mask; + ValuatorMask **last_mt_vals; int cur_slot; enum SlotState slot_state; #ifdef MULTITOUCH commit 9d9c9870c88f2c636799a68cde8efcab59a4a2a5 Author: Peter Hutterer <peter.hutte...@who-t.net> -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1rw2ri-0004mu...@vasks.debian.org