debian/changelog | 8 + debian/patches/218_getValuatorEvents_cleanup.patch | 49 ++++++++ debian/patches/219_xi1_handle_noncontinuous_valuator_data.patch | 59 ++++++++++ debian/patches/series | 2 4 files changed, 117 insertions(+), 1 deletion(-)
New commits: commit fe7b6f98a3ec1b6870d764d14c186eabaccc53a5 Author: Chase Douglas <[email protected]> Date: Tue Mar 29 09:39:22 2011 -0400 Fix jumpy cursor in XI 1.x applications (LP: #736500) * Fix jumpy cursor in XI 1.x applications (LP: #736500) - Added 218_getValuatorEvents_cleanup.patch - Added 219_xi1_handle_noncontinuous_valuator_data.patch diff --git a/debian/changelog b/debian/changelog index eaafe69..1f3b413 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,15 @@ xorg-server (2:1.10.0-0ubuntu3) UNRELEASED; urgency=low + [ Bryce Harrington ] * patches/111_armel-drv-fallbacks.patch: Always fallback to -fbdev, not just when no other X driver matches. (Thanks jcristau) - -- Bryce Harrington <[email protected]> Thu, 24 Mar 2011 21:52:17 -0700 + [ Chase Douglas ] + * Fix jumpy cursor in XI 1.x applications (LP: #736500) + - Added 218_getValuatorEvents_cleanup.patch + - Added 219_xi1_handle_noncontinuous_valuator_data.patch + + -- Chase Douglas <[email protected]> Mon, 28 Mar 2011 12:20:01 -0400 xorg-server (2:1.10.0-0ubuntu2) natty; urgency=low diff --git a/debian/patches/218_getValuatorEvents_cleanup.patch b/debian/patches/218_getValuatorEvents_cleanup.patch new file mode 100644 index 0000000..df0aff5 --- /dev/null +++ b/debian/patches/218_getValuatorEvents_cleanup.patch @@ -0,0 +1,49 @@ +From de10e8681b40d12da01a75600a4d11fa01efac5d Mon Sep 17 00:00:00 2001 +From: Chase Douglas <[email protected]> +Date: Mon, 28 Mar 2011 12:02:51 -0400 +Subject: [PATCH 1/2] Clean up getValuatorEvents using array loop logic + +Signed-off-by: Chase Douglas <[email protected]> +--- + dix/eventconvert.c | 20 ++++++-------------- + 1 files changed, 6 insertions(+), 14 deletions(-) + +diff --git a/dix/eventconvert.c b/dix/eventconvert.c +index 7834d68..9192080 100644 +--- a/dix/eventconvert.c ++++ b/dix/eventconvert.c +@@ -378,25 +378,17 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) + + /* FIXME: non-continuous valuator data in internal events*/ + for (i = 0; i < num_valuators; i += 6, xv++) { ++ INT32 *valuators = &xv->valuator0; // Treat all 6 vals as an array ++ int j; ++ + xv->type = DeviceValuator; + xv->first_valuator = first_valuator + i; + xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i); + xv->deviceid = ev->deviceid; + xv->device_state = state; +- switch (xv->num_valuators) { +- case 6: +- xv->valuator5 = ev->valuators.data[xv->first_valuator + 5]; +- case 5: +- xv->valuator4 = ev->valuators.data[xv->first_valuator + 4]; +- case 4: +- xv->valuator3 = ev->valuators.data[xv->first_valuator + 3]; +- case 3: +- xv->valuator2 = ev->valuators.data[xv->first_valuator + 2]; +- case 2: +- xv->valuator1 = ev->valuators.data[xv->first_valuator + 1]; +- case 1: +- xv->valuator0 = ev->valuators.data[xv->first_valuator + 0]; +- } ++ ++ for (j = 0; j < xv->num_valuators; j++) ++ valuators[j] = ev->valuators.data[xv->first_valuator + j]; + + if (i + 6 < num_valuators) + xv->deviceid |= MORE_EVENTS; +-- +1.7.4.1 + diff --git a/debian/patches/219_xi1_handle_noncontinuous_valuator_data.patch b/debian/patches/219_xi1_handle_noncontinuous_valuator_data.patch new file mode 100644 index 0000000..e12914a --- /dev/null +++ b/debian/patches/219_xi1_handle_noncontinuous_valuator_data.patch @@ -0,0 +1,59 @@ +From 8a67ba29b82e2a627172b7ee181091df59e4cace Mon Sep 17 00:00:00 2001 +From: Chase Douglas <[email protected]> +Date: Mon, 28 Mar 2011 12:08:46 -0400 +Subject: [PATCH 2/2] Handle non continuous valuator data in getValuatorEvents + +This allows for masked valuators to be handled properly in XI 1.x +events. Any unset valuators in the device event are set to the last +known value when transmitted on the wire through XI 1.x valuator events. + +Fixes https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/736500 + +Signed-off-by: Chase Douglas <[email protected]> +--- + dix/eventconvert.c | 11 +++++++---- + 1 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/dix/eventconvert.c b/dix/eventconvert.c +index 9192080..3285133 100644 +--- a/dix/eventconvert.c ++++ b/dix/eventconvert.c +@@ -364,19 +364,18 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) + int i; + int state = 0; + int first_valuator, num_valuators; ++ DeviceIntPtr dev = NULL; + + + num_valuators = countValuators(ev, &first_valuator); + if (num_valuators > 0) + { +- DeviceIntPtr dev = NULL; + dixLookupDevice(&dev, ev->deviceid, serverClient, DixUseAccess); + /* State needs to be assembled BEFORE the device is updated. */ + state = (dev && dev->key) ? XkbStateFieldFromRec(&dev->key->xkbInfo->state) : 0; + state |= (dev && dev->button) ? (dev->button->state) : 0; + } + +- /* FIXME: non-continuous valuator data in internal events*/ + for (i = 0; i < num_valuators; i += 6, xv++) { + INT32 *valuators = &xv->valuator0; // Treat all 6 vals as an array + int j; +@@ -387,8 +386,12 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) + xv->deviceid = ev->deviceid; + xv->device_state = state; + +- for (j = 0; j < xv->num_valuators; j++) +- valuators[j] = ev->valuators.data[xv->first_valuator + j]; ++ for (j = 0; j < xv->num_valuators; j++) { ++ if (BitIsOn(ev->valuators.mask, xv->first_valuator + j)) ++ valuators[j] = ev->valuators.data[xv->first_valuator + j]; ++ else ++ valuators[j] = dev->valuator->axisVal[xv->first_valuator + j]; ++ } + + if (i + 6 < num_valuators) + xv->deviceid |= MORE_EVENTS; +-- +1.7.4.1 + diff --git a/debian/patches/series b/debian/patches/series index 780f10f..eeefe9f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -34,6 +34,8 @@ 215_glx_drawable_refcounting.diff 216_fix_sdksyms_build.diff 217_revert_bgnonevisitwindow.patch +218_getValuatorEvents_cleanup.patch +219_xi1_handle_noncontinuous_valuator_data.patch 500_xi2.1.patch 501_xf86CoordinatesToWindow.patch 502_gestures-extension.patch -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

