debian/changelog | 7 +++++++ src/eventcomm.c | 43 +++++++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 20 deletions(-)
New commits: commit 3e9988113562a04d87edc87c93980278c3d2b283 Author: Cyril Brulebois <k...@debian.org> Date: Mon Dec 12 13:28:38 2011 +0100 Upload to unstable. diff --git a/debian/changelog b/debian/changelog index cade0db..31574b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -xserver-xorg-input-synaptics (1.5.0-2) UNRELEASED; urgency=low +xserver-xorg-input-synaptics (1.5.0-2) unstable; urgency=low * Cherry-pick to fix regression on powerpc (Closes: #649002): - b7e65f04f: Revert the switch from TEST_BIT to BitIsOn. - -- Cyril Brulebois <k...@debian.org> Mon, 12 Dec 2011 13:20:57 +0100 + -- Cyril Brulebois <k...@debian.org> Mon, 12 Dec 2011 13:28:36 +0100 xserver-xorg-input-synaptics (1.5.0-1) unstable; urgency=low commit fe2e9f118d5968a056ebc77e57c20ecb35bacecc Author: Cyril Brulebois <k...@debian.org> Date: Mon Dec 12 13:28:33 2011 +0100 Document the cherry-pick. diff --git a/debian/changelog b/debian/changelog index de64e2b..cade0db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xserver-xorg-input-synaptics (1.5.0-2) UNRELEASED; urgency=low + + * Cherry-pick to fix regression on powerpc (Closes: #649002): + - b7e65f04f: Revert the switch from TEST_BIT to BitIsOn. + + -- Cyril Brulebois <k...@debian.org> Mon, 12 Dec 2011 13:20:57 +0100 + xserver-xorg-input-synaptics (1.5.0-1) unstable; urgency=low [ Timo Aaltonen ] commit b0e50d6503ab3e09f6438acd510171c8b87edf5b Author: Cyril Brulebois <k...@debian.org> Date: Mon Dec 12 01:35:27 2011 +0100 Revert: "eventcomm: replace synaptics-custom TEST_BIT with server's BitIsOn." This commit reverts 13543b156d78bc4d01a19844a5ee8f283269621b As seen in Debian's #649002, this switch causes a regression on PowerPC, especially seen on iBook G4 with appletouch. Take a defensive stance and revert back to a working state until things have been figured out and fixed properly. Since things have evolved and since that revert triggers a lot of conflicts, the following method was applied: - manual reintroduction of the 3 removed macros: OFF, LONG, TEST_BIT - coccinelle semantic patch to revert from BitIsOn to TEST_BIT Coccinelle semantic patch: @@ expression a,b; @@ -BitIsOn(a,b) +TEST_BIT(b,a) Bugzilla: http://bugs.debian.org/649002 Bugzilla: http://bugs.freedesktop.org/43728 Signed-off-by: Cyril Brulebois <k...@debian.org> (cherry picked from commit b7e65f04f5f0c17ac8a26393134cc7e8418ccdec, with proper references this time) diff --git a/src/eventcomm.c b/src/eventcomm.c index 9cabd14..4939958 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -47,6 +47,9 @@ #define LONG_BITS (sizeof(long) * 8) #define NBITS(x) (((x) + LONG_BITS - 1) / LONG_BITS) +#define OFF(x) ((x) % LONG_BITS) +#define LONG(x) ((x) / LONG_BITS) +#define TEST_BIT(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1) /** * Protocol-specific data. @@ -119,16 +122,16 @@ event_query_is_touchpad(int fd, BOOL test_grab) SYSCALL(rc = ioctl(fd, EVIOCGBIT(0, sizeof(evbits)), evbits)); if (rc < 0) goto unwind; - if (!BitIsOn(evbits, EV_SYN) || - !BitIsOn(evbits, EV_ABS) || - !BitIsOn(evbits, EV_KEY)) + if (!TEST_BIT(EV_SYN, evbits) || + !TEST_BIT(EV_ABS, evbits) || + !TEST_BIT(EV_KEY, evbits)) goto unwind; SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbits)), absbits)); if (rc < 0) goto unwind; - if (!BitIsOn(absbits, ABS_X) || - !BitIsOn(absbits, ABS_Y)) + if (!TEST_BIT(ABS_X, absbits) || + !TEST_BIT(ABS_Y, absbits)) goto unwind; SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybits)), keybits)); @@ -136,12 +139,12 @@ event_query_is_touchpad(int fd, BOOL test_grab) goto unwind; /* we expect touchpad either report raw pressure or touches */ - if (!BitIsOn(absbits, ABS_PRESSURE) && !BitIsOn(keybits, BTN_TOUCH)) + if (!TEST_BIT(ABS_PRESSURE, absbits) && !TEST_BIT(BTN_TOUCH, keybits)) goto unwind; /* all Synaptics-like touchpad report BTN_TOOL_FINGER */ - if (!BitIsOn(keybits, BTN_TOOL_FINGER)) + if (!TEST_BIT(BTN_TOOL_FINGER, keybits)) goto unwind; - if (BitIsOn(keybits, BTN_TOOL_PEN)) + if (TEST_BIT(BTN_TOOL_PEN, keybits)) goto unwind; /* Don't match wacom tablets */ ret = TRUE; @@ -266,8 +269,8 @@ event_query_axis_ranges(InputInfoPtr pInfo) SYSCALL(rc = ioctl(pInfo->fd, EVIOCGBIT(EV_ABS, sizeof(absbits)), absbits)); if (rc >= 0) { - priv->has_pressure = (BitIsOn(absbits, ABS_PRESSURE) != 0); - priv->has_width = (BitIsOn(absbits, ABS_TOOL_WIDTH) != 0); + priv->has_pressure = (TEST_BIT(ABS_PRESSURE, absbits) != 0); + priv->has_width = (TEST_BIT(ABS_TOOL_WIDTH, absbits) != 0); } else xf86IDrvMsg(pInfo, X_ERROR, "failed to query ABS bits (%s)\n", strerror(errno)); @@ -284,16 +287,16 @@ event_query_axis_ranges(InputInfoPtr pInfo) SYSCALL(rc = ioctl(pInfo->fd, EVIOCGBIT(EV_KEY, sizeof(keybits)), keybits)); if (rc >= 0) { - priv->has_left = (BitIsOn(keybits, BTN_LEFT) != 0); - priv->has_right = (BitIsOn(keybits, BTN_RIGHT) != 0); - priv->has_middle = (BitIsOn(keybits, BTN_MIDDLE) != 0); - priv->has_double = (BitIsOn(keybits, BTN_TOOL_DOUBLETAP) != 0); - priv->has_triple = (BitIsOn(keybits, BTN_TOOL_TRIPLETAP) != 0); - - if ((BitIsOn(keybits, BTN_0) != 0) || - (BitIsOn(keybits, BTN_1) != 0) || - (BitIsOn(keybits, BTN_2) != 0) || - (BitIsOn(keybits, BTN_3) != 0)) + priv->has_left = (TEST_BIT(BTN_LEFT, keybits) != 0); + priv->has_right = (TEST_BIT(BTN_RIGHT, keybits) != 0); + priv->has_middle = (TEST_BIT(BTN_MIDDLE, keybits) != 0); + priv->has_double = (TEST_BIT(BTN_TOOL_DOUBLETAP, keybits) != 0); + priv->has_triple = (TEST_BIT(BTN_TOOL_TRIPLETAP, keybits) != 0); + + if ((TEST_BIT(BTN_0, keybits) != 0) || + (TEST_BIT(BTN_1, keybits) != 0) || + (TEST_BIT(BTN_2, keybits) != 0) || + (TEST_BIT(BTN_3, keybits) != 0)) priv->has_scrollbuttons = 1; } -- 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/e1ra549-0004tt...@vasks.debian.org