xserver-xorg-input-evdev: Changes to 'debian-unstable'
ChangeLog | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 5 -
debian/README.source | 73 ++++++++++++++++++++++
debian/changelog | 9 ++
debian/control | 2
debian/xsfbs/xsfbs.sh | 12 ---
man/evdev.man | 2
src/emuMB.c | 6 +
src/emuWheel.c | 9 --
src/evdev.c | 57 ++++++++++++++---
10 files changed, 299 insertions(+), 38 deletions(-)
New commits:
commit 55a8ac46b2ecc65837e2a1718a8872f509245629
Author: Brice Goglin <bgoglin@debian.org>
Date: Thu Jul 30 09:14:51 2009 +0200
Prepare changelog for upload
diff --git a/debian/changelog b/debian/changelog
index e7bebc5..9d7d76f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,11 @@
-xserver-xorg-input-evdev (1:2.2.3-1) UNRELEASED; urgency=low
+xserver-xorg-input-evdev (1:2.2.3-1) unstable; urgency=low
* New upstream release.
+ Fix corrupted mouse motion events sending pointer to
top-left of screen, cloces: #528994.
* Add README.source, bump Standards-Version to 3.8.2.
- -- Brice Goglin <bgoglin@debian.org> Thu, 30 Jul 2009 09:14:15 +0200
+ -- Brice Goglin <bgoglin@debian.org> Thu, 30 Jul 2009 09:14:44 +0200
xserver-xorg-input-evdev (1:2.2.2-1) unstable; urgency=low
commit ebe1b7319765a9eae8aa12cd2f06c1ca41ed2f3d
Author: Brice Goglin <bgoglin@debian.org>
Date: Thu Jul 30 09:14:34 2009 +0200
Bump Standards-Version to 3.8.2 now that we have README.source
diff --git a/debian/changelog b/debian/changelog
index 27dd888..e7bebc5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,9 @@ xserver-xorg-input-evdev (1:2.2.3-1) UNRELEASED; urgency=low
* New upstream release.
+ Fix corrupted mouse motion events sending pointer to
top-left of screen, cloces: #528994.
+ * Add README.source, bump Standards-Version to 3.8.2.
- -- Brice Goglin <bgoglin@debian.org> Thu, 30 Jul 2009 09:10:10 +0200
+ -- Brice Goglin <bgoglin@debian.org> Thu, 30 Jul 2009 09:14:15 +0200
xserver-xorg-input-evdev (1:2.2.2-1) unstable; urgency=low
diff --git a/debian/control b/debian/control
index 2bcc7fe..726b204 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,7 @@ Build-Depends:
automake,
libtool,
xutils-dev
-Standards-Version: 3.7.3
+Standards-Version: 3.8.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 8c90225187e9e695b96bd49b6435f58b34cb0e67
Author: Brice Goglin <bgoglin@debian.org>
Date: Thu Jul 30 09:10:44 2009 +0200
New upstream release
diff --git a/ChangeLog b/ChangeLog
index 70c7df3..28313ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,165 @@
+commit c0bee1b4d6d3664322b2f35775675ac84354f702
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Jul 30 11:08:59 2009 +1000
+
+ evdev 2.2.3
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 8acc999d404b9b6012588e2021324553dda9405d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Jul 30 09:38:31 2009 +1000
+
+ Evdev doesn't require inputproto.
+
+ None of the inputproto headers seem to be included anywhere.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit 6f4634111a83808bc52e7e53733cf2d3bab0cccd)
+
+ Conflicts:
+
+ configure.ac
+
+commit 3cce7fa38a152ba66d379591e6e3ece60bd73fdd
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri Jun 26 09:37:29 2009 +1000
+
+ If a device fails to initialize relative axes, init the abs. axes instead.
+
+ Some devices have relative axes that don't count (scroll wheels). In this
+ case, don't claim we've initialized relative axes, continue with the
+ absolute axes instead.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit b07ab6ea97b779b26e7ae8326528c262cc9907a1)
+
+commit c793aa27381dc346d88a3e7d8bdb90dd8d3ed39c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon Jul 20 14:52:34 2009 +1000
+
+ Don't register middle mouse button emulation handlers for keyboards.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit 2994825665790dc8e35b2944e0d411f3cc9f76fd)
+
+commit 9f3632c0b6c181706daf661646de5994217c0bb2
+Author: Oliver McFadden <oliver.mcfadden@nokia.com>
+Date: Thu Jul 16 18:25:37 2009 +0300
+
+ Coverity Prevent: NO_EFFECT in EvdevWheelEmuSetProperty:
+
+ Event unsigned_compare: Comparing unsigned less than zero is never true. "pEvdev->emulateWheel.timeout < 0UL"
+ 342 if (pEvdev->emulateWheel.timeout < 0)
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit 9bfd9e8a3683f14860149ae9f842e88828cc0960)
+
+commit 06b303f26d5fab17b7d82dbf2bda3f77dad2364c
+Author: Asbj�annes <ace@sannes.org>
+Date: Wed Jul 1 09:51:12 2009 +0200
+
+ evdev: Fix spelling of property in man page to match source code. #22571
+
+ Signed-off-by: Asbj�rn Sannes <ace@sannes.org>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit db8b1ca5cffbc48f7d9c5c166489c714ac92ea86)
+
+commit 4dda242d56a7830d5b44d7e58cf6a95f62a617ce
+Author: Derek Upham <sand@blarg.net>
+Date: Thu May 21 00:15:28 2009 -0700
+
+ evdev: Prevent driver from processing motion events that it has not configured. #21832
+
+ The current implementation initializes itself to support relative
+ motion events, or absolute motion events, or neither. But the
+ event-handling code attempts to process all events, no matter what the
+ initialization was. This patch reproduces the flag tests found during
+ init, to skip events that the driver doesn't support.
+
+ Signed-off-by: Derek Upham <sand@blarg.net>
+ Signed-off-by: Julien Cristau <jcristau@debian.org>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit 0a3657d2ee62f4086e9687218cb33835ba61a0b3)
+
+commit 4efe0d272ed6ef7bda4cc005ad6033f2b1916fdc
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu May 21 13:30:10 2009 +1000
+
+ Deal with BTN_3 to BTN_9 buttons.
+
+ These buttons were previously mapped to 0, i.e. inactive. This patch
+ slightly improves things in that the buttons are now mapped to 8+.
+
+ Devices that have both BTN_3 and BTN_SIDE (or a similar pair in that
+ sequence) have both mapped to the same button number though.
+ Devices that have BTN_LEFT, BTN_0, BTN_3 and BTN_SIDE have the last three
+ mapped to 8 (and their followers have double-mappings too). We'll fix that
+ once we actually see devices affected by this.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit dc2191285e799be891787e1f64d10c1cba271240)
+
+commit 1432b5153ec2666845c2017eedc3c166fd8c8e3c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu May 21 10:23:37 2009 +1000
+
+ Only initialize the number of buttons we actually have.
+
+ This takes into account driver-configured button mappings, i.e. if device
+ with one button has this button mapped to 25 through the ButtonMapping
+ option, the X server will think the device has result 25 buttons.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit 255b9f6bbf374a315750019c6fadc5f82fb7d41d)
+
+commit b8519930e415043545e87ea660f6f0b3109537bf
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed May 20 11:57:01 2009 +1000
+
+ Ensure enough buttons are advertised to pass the button mapping.
+
+ Some buttons are mapped to higher button numbers. For example, BTN_0 is
+ posted as button 8 if BTN_LEFT is present. On top of that, the
+ driver-specific button mapping may map the button to something else again.
+ We need to take these mappings into account when counting the number of
+ buttons on the device.
+
+ Example: A device with BTN_LEFT and BTN_0 and a mapping from 1 -> 7 and 8 ->
+ 2.
+
+ BTN_LEFT is mapped to 1. 1 is mapped to 7. num_buttons is 7.
+ BTN_0 is mapped to 8. 8 is mapped to 2. num_buttons remains 7.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit b358f1eb3a4ef8fdee099114d6c70d6ea06eba95)
+
+commit 6d43a45b99e07325c74cbe1d20b04094ba99950d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed May 20 11:47:37 2009 +1000
+
+ Up the number of button labels atoms to EVDEV_MAXBUTTONS.
+
+ Button labels would smash memory if the device had less than 4 buttons and
+ did not advertise a wheel event. In this case the hard-coded wheel button
+ labels would write past the atoms[] boundary.
+
+ Potential memory smash if a device had a BTN_LEFT and BTN_0, since the
+ latter would map to 8, regardless of the the number of actual buttons
+ (same with BTN_MIDDLE and BTN_1 or BTN_RIGHT and BTN_2).
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit 33cc112ca1af377a85cfeb05dfb72f07d3850a95)
+
+commit 40d3ad3ac00fc21f2561c906d1246648a9f74087
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed May 20 11:42:35 2009 +1000
+
+ Only label axes and buttons if the device has axes or buttons.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ (cherry picked from commit 3c43d880f13725a04fcd7c0c8d5978a36208e373)
+
commit cf887a2b7cff9eb99c872a9cf5a9382ff6317899
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Apr 30 16:39:15 2009 +1000
diff --git a/debian/changelog b/debian/changelog
index e6b2121..27dd888 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+xserver-xorg-input-evdev (1:2.2.3-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+ + Fix corrupted mouse motion events sending pointer to
+ top-left of screen, cloces: #528994.
+
+ -- Brice Goglin <bgoglin@debian.org> Thu, 30 Jul 2009 09:10:10 +0200
+
xserver-xorg-input-evdev (1:2.2.2-1) unstable; urgency=low
* New upstream release.
commit c0bee1b4d6d3664322b2f35775675ac84354f702
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jul 30 11:08:59 2009 +1000
evdev 2.2.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index 87a3b18..c89e356 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-input-evdev],
- 2.2.2,
+ 2.2.3,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-input-evdev)
commit 8acc999d404b9b6012588e2021324553dda9405d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jul 30 09:38:31 2009 +1000
Evdev doesn't require inputproto.
None of the inputproto headers seem to be included anywhere.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 6f4634111a83808bc52e7e53733cf2d3bab0cccd)
Conflicts:
configure.ac
diff --git a/configure.ac b/configure.ac
index 3f23d21..87a3b18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,9 +68,6 @@ if test "x$BUILD_TEST" = "xyes"; then
AC_SUBST([DLOPEN_LIBS])
fi
-# Checks for extensions
-XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
-
# Checks for pkg-config packages. We need to be able to override sdkdir
# to satisfy silly distcheck requirements.
PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES)
commit 3cce7fa38a152ba66d379591e6e3ece60bd73fdd
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Jun 26 09:37:29 2009 +1000
If a device fails to initialize relative axes, init the abs. axes instead.
Some devices have relative axes that don't count (scroll wheels). In this
case, don't claim we've initialized relative axes, continue with the
absolute axes instead.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b07ab6ea97b779b26e7ae8326528c262cc9907a1)
diff --git a/src/evdev.c b/src/evdev.c
index 490fa44..acf2943 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1061,6 +1061,9 @@ EvdevAddRelClass(DeviceIntPtr device)
if (TestBit(REL_DIAL, pEvdev->rel_bitmask))
num_axes--;
+ if (num_axes <= 0)
+ return !Success;
+
pEvdev->num_vals = num_axes;
memset(pEvdev->vals, 0, num_axes * sizeof(int));
@@ -1188,12 +1191,17 @@ EvdevInit(DeviceIntPtr device)
FIXME: somebody volunteer to fix this.
*/
if (pEvdev->flags & EVDEV_RELATIVE_EVENTS) {
- EvdevAddRelClass(device);
- if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS)
- xf86Msg(X_INFO,"%s: relative axes found, ignoring absolute "
- "axes.\n", device->name);
- pEvdev->flags &= ~EVDEV_ABSOLUTE_EVENTS;
- } else if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS)
+ if (EvdevAddRelClass(device) == Success)
+ {
+ if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS)
+ xf86Msg(X_INFO,"%s: relative axes found, ignoring absolute "
+ "axes.\n", device->name);
+ pEvdev->flags &= ~EVDEV_ABSOLUTE_EVENTS;
+ } else
+ pEvdev->flags &= ~EVDEV_RELATIVE_EVENTS;
+ }
+
+ if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS)
EvdevAddAbsClass(device);
#ifdef HAVE_PROPERTIES
commit c793aa27381dc346d88a3e7d8bdb90dd8d3ed39c
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Jul 20 14:52:34 2009 +1000
Don't register middle mouse button emulation handlers for keyboards.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 2994825665790dc8e35b2944e0d411f3cc9f76fd)
diff --git a/src/emuMB.c b/src/emuMB.c
index 41d0d2c..b29f552 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -327,6 +327,9 @@ EvdevMBEmuPreInit(InputInfoPtr pInfo)
void
EvdevMBEmuOn(InputInfoPtr pInfo)
{
+ if (!pInfo->dev->button) /* don't init for keyboards */
+ return;
+
RegisterBlockAndWakeupHandlers (EvdevMBEmuBlockHandler,
EvdevMBEmuWakeupHandler,
(pointer)pInfo);
@@ -335,6 +338,9 @@ EvdevMBEmuOn(InputInfoPtr pInfo)
void
EvdevMBEmuFinalize(InputInfoPtr pInfo)
{
+ if (!pInfo->dev->button) /* don't cleanup for keyboards */
+ return;
+
RemoveBlockAndWakeupHandlers (EvdevMBEmuBlockHandler,
EvdevMBEmuWakeupHandler,
(pointer)pInfo);
commit 9f3632c0b6c181706daf661646de5994217c0bb2
Author: Oliver McFadden <oliver.mcfadden@nokia.com>
Date: Thu Jul 16 18:25:37 2009 +0300
Coverity Prevent: NO_EFFECT in EvdevWheelEmuSetProperty:
Event unsigned_compare: Comparing unsigned less than zero is never true. "pEvdev->emulateWheel.timeout < 0UL"
342 if (pEvdev->emulateWheel.timeout < 0)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 9bfd9e8a3683f14860149ae9f842e88828cc0960)
diff --git a/src/emuWheel.c b/src/emuWheel.c
index 7d3eb24..2854736 100644
--- a/src/emuWheel.c
+++ b/src/emuWheel.c
@@ -337,15 +337,6 @@ EvdevWheelEmuSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
16, PropModeReplace, 1,
&pEvdev->emulateWheel.inertia, TRUE);
}
-
- /* Don't enable with negative timeout */
- if (pEvdev->emulateWheel.timeout < 0)
- {
- pEvdev->emulateWheel.timeout = 200;
- XIChangeDeviceProperty(dev, prop_wheel_timeout, XA_INTEGER, 16,
- PropModeReplace, 1,
- &pEvdev->emulateWheel.timeout, TRUE);
- }
}
}
else if (atom == prop_wheel_button)
commit 06b303f26d5fab17b7d82dbf2bda3f77dad2364c
Author: Asbj�annes <ace@sannes.org>
Date: Wed Jul 1 09:51:12 2009 +0200
evdev: Fix spelling of property in man page to match source code. #22571
Signed-off-by: Asbj�rn Sannes <ace@sannes.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit db8b1ca5cffbc48f7d9c5c166489c714ac92ea86)
diff --git a/man/evdev.man b/man/evdev.man
index b6ad1f1..07f125a 100644
--- a/man/evdev.man
+++ b/man/evdev.man
@@ -171,7 +171,7 @@ server, such as touchscreens that require run-time calibration.
.BI "Evdev Axis Inversion"
2 boolean values (8 bit, 0 or 1), order X, Y. 1 inverts the axis.
.TP 7
-.BI "Evdev Axis Swap"
+.BI "Evdev Axes Swap"
1 boolean value (8 bit, 0 or 1). 1 swaps x/y axes.
.TP 7
.BI "Evdev Drag Lock Buttons"
commit 4dda242d56a7830d5b44d7e58cf6a95f62a617ce
Author: Derek Upham <sand@blarg.net>
Date: Thu May 21 00:15:28 2009 -0700
evdev: Prevent driver from processing motion events that it has not configured. #21832
The current implementation initializes itself to support relative
motion events, or absolute motion events, or neither. But the
event-handling code attempts to process all events, no matter what the
initialization was. This patch reproduces the flag tests found during
init, to skip events that the driver doesn't support.
Signed-off-by: Derek Upham <sand@blarg.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0a3657d2ee62f4086e9687218cb33835ba61a0b3)
diff --git a/src/evdev.c b/src/evdev.c
index 3a9fb0e..490fa44 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -362,6 +362,10 @@ EvdevProcessEvent(InputInfoPtr pInfo, struct input_event *ev)
switch (ev->type) {
case EV_REL:
+ /* Ignore EV_REL events if we never set up for them. */
+ if (!(pEvdev->flags & EVDEV_RELATIVE_EVENTS))
+ break;
+
/* Handle mouse wheel emulation */
if (EvdevWheelEmuFilterMotion(pInfo, ev))
break;
@@ -392,6 +396,10 @@ EvdevProcessEvent(InputInfoPtr pInfo, struct input_event *ev)
break;
case EV_ABS:
+ /* Ignore EV_ABS events if we never set up for them. */
+ if (!(pEvdev->flags & EVDEV_ABSOLUTE_EVENTS))
+ break;
+
if (ev->code > ABS_MAX)
break;
pEvdev->vals[pEvdev->axis_map[ev->code]] = value;
@@ -1179,9 +1187,13 @@ EvdevInit(DeviceIntPtr device)
FIXME: somebody volunteer to fix this.
*/
- if (pEvdev->flags & EVDEV_RELATIVE_EVENTS)
+ if (pEvdev->flags & EVDEV_RELATIVE_EVENTS) {
EvdevAddRelClass(device);
- else if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS)
+ if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS)
+ xf86Msg(X_INFO,"%s: relative axes found, ignoring absolute "
+ "axes.\n", device->name);
+ pEvdev->flags &= ~EVDEV_ABSOLUTE_EVENTS;
+ } else if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS)
EvdevAddAbsClass(device);
#ifdef HAVE_PROPERTIES
commit 4efe0d272ed6ef7bda4cc005ad6033f2b1916fdc
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu May 21 13:30:10 2009 +1000
Deal with BTN_3 to BTN_9 buttons.
These buttons were previously mapped to 0, i.e. inactive. This patch
slightly improves things in that the buttons are now mapped to 8+.
Devices that have both BTN_3 and BTN_SIDE (or a similar pair in that
sequence) have both mapped to the same button number though.
Devices that have BTN_LEFT, BTN_0, BTN_3 and BTN_SIDE have the last three
mapped to 8 (and their followers have double-mappings too). We'll fix that
once we actually see devices affected by this.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit dc2191285e799be891787e1f64d10c1cba271240)
diff --git a/src/evdev.c b/src/evdev.c
index b880c6a..3a9fb0e 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1767,6 +1767,17 @@ EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code)
button = (TestBit(BTN_RIGHT, pEvdev->key_bitmask)) ? 10 : 3;
break;
+ /* FIXME: BTN_3.. and BTN_SIDE.. have the same button mapping */
+ case BTN_3:
+ case BTN_4:
+ case BTN_5:
+ case BTN_6:
+ case BTN_7:
+ case BTN_8:
+ case BTN_9:
+ button = (code - BTN_0 + 5);
+ break;
+
case BTN_SIDE:
case BTN_EXTRA:
case BTN_FORWARD:
commit 1432b5153ec2666845c2017eedc3c166fd8c8e3c
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu May 21 10:23:37 2009 +1000
Only initialize the number of buttons we actually have.
This takes into account driver-configured button mappings, i.e. if device
with one button has this button mapped to 25 through the ButtonMapping
option, the X server will think the device has result 25 buttons.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 255b9f6bbf374a315750019c6fadc5f82fb7d41d)
diff --git a/src/evdev.c b/src/evdev.c
index a9e1d27..b880c6a 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1095,9 +1095,7 @@ EvdevAddButtonClass(DeviceIntPtr device)
pInfo = device->public.devicePrivate;
pEvdev = pInfo->private;
- /* FIXME: count number of actual buttons */
- if (!InitButtonClassDeviceStruct(device, ArrayLength(pEvdev->btnmap),
- pEvdev->btnmap))
+ if (!InitButtonClassDeviceStruct(device, pEvdev->buttons, pEvdev->btnmap))
return !Success;
return Success;
commit b8519930e415043545e87ea660f6f0b3109537bf
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed May 20 11:57:01 2009 +1000
Ensure enough buttons are advertised to pass the button mapping.
Some buttons are mapped to higher button numbers. For example, BTN_0 is
posted as button 8 if BTN_LEFT is present. On top of that, the
driver-specific button mapping may map the button to something else again.
We need to take these mappings into account when counting the number of
buttons on the device.
Example: A device with BTN_LEFT and BTN_0 and a mapping from 1 -> 7 and 8 ->
2.
BTN_LEFT is mapped to 1. 1 is mapped to 7. num_buttons is 7.
BTN_0 is mapped to 8. 8 is mapped to 2. num_buttons remains 7.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b358f1eb3a4ef8fdee099114d6c70d6ea06eba95)
diff --git a/src/evdev.c b/src/evdev.c
index 80ba276..a9e1d27 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1466,8 +1466,14 @@ EvdevProbe(InputInfoPtr pInfo)
/* count all buttons */
for (i = BTN_MISC; i < BTN_JOYSTICK; i++)
{
+ int mapping = 0;
if (TestBit(i, pEvdev->key_bitmask))
- num_buttons++;
+ {
+ mapping =
+ pEvdev->btnmap[EvdevUtilButtonEventToButtonNumber(pEvdev, i)];
+ if (mapping > num_buttons)
+ num_buttons = mapping;
+ }
}
if (num_buttons)
commit 6d43a45b99e07325c74cbe1d20b04094ba99950d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed May 20 11:47:37 2009 +1000
Up the number of button labels atoms to EVDEV_MAXBUTTONS.
Button labels would smash memory if the device had less than 4 buttons and
did not advertise a wheel event. In this case the hard-coded wheel button
labels would write past the atoms[] boundary.
Potential memory smash if a device had a BTN_LEFT and BTN_0, since the
latter would map to 8, regardless of the the number of actual buttons
(same with BTN_MIDDLE and BTN_1 or BTN_RIGHT and BTN_2).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 33cc112ca1af377a85cfeb05dfb72f07d3850a95)
diff --git a/src/evdev.c b/src/evdev.c
index fc4832b..80ba276 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2028,12 +2028,12 @@ EvdevInitProperty(DeviceIntPtr dev)
/* Button labelling */
if ((pEvdev->buttons > 0) && (prop_btn_label = XIGetKnownProperty(BTN_LABEL_PROP)))
{
- Atom atom, atoms[pEvdev->buttons];
+ Atom atom, atoms[EVDEV_MAXBUTTONS];
int button, bmap;
/* First, make sure all atoms are initialized */
atom = XIGetKnownProperty(BTN_LABEL_PROP_BTN_UNKNOWN);
- for (button = 0; button < pEvdev->buttons; button++)
+ for (button = 0; button < ArrayLength(atoms); button++)
atoms[button] = atom;
for (button = BTN_MISC; button < BTN_JOYSTICK; button++)
commit 40d3ad3ac00fc21f2561c906d1246648a9f74087
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed May 20 11:42:35 2009 +1000
Only label axes and buttons if the device has axes or buttons.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 3c43d880f13725a04fcd7c0c8d5978a36208e373)
diff --git a/src/evdev.c b/src/evdev.c
index 9fc0663..fc4832b 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1982,7 +1982,7 @@ EvdevInitProperty(DeviceIntPtr dev)
#ifdef HAVE_LABELS
/* Axis labelling */
- if ((prop_axis_label = XIGetKnownProperty(AXIS_LABEL_PROP)))
+ if ((pEvdev->num_vals > 0) && (prop_axis_label = XIGetKnownProperty(AXIS_LABEL_PROP)))
{
Atom atom, atoms[pEvdev->num_vals];
int natoms = pEvdev->num_vals;
@@ -2026,7 +2026,7 @@ EvdevInitProperty(DeviceIntPtr dev)
XISetDevicePropertyDeletable(dev, prop_axis_label, FALSE);
}
/* Button labelling */
- if ((prop_btn_label = XIGetKnownProperty(BTN_LABEL_PROP)))
+ if ((pEvdev->buttons > 0) && (prop_btn_label = XIGetKnownProperty(BTN_LABEL_PROP)))
{
Atom atom, atoms[pEvdev->buttons];
int button, bmap;
commit 8f72294ada477f003888b6776883c1dd98289f3f
Author: Julien Cristau <jcristau@debian.org>
Date: Wed Jun 3 03:37:37 2009 +0200
Kill custom readlink function
This was needed for very, very old versions of debianutils.
Closes: #498890
diff --git a/debian/xsfbs/xsfbs.sh b/debian/xsfbs/xsfbs.sh
index 197eb74..781826f 100644
--- a/debian/xsfbs/xsfbs.sh
+++ b/debian/xsfbs/xsfbs.sh
@@ -303,16 +303,6 @@ EOF
fi
}
-# we require a readlink command or shell function
-if ! which readlink > /dev/null 2>&1; then
- message "The readlink command was not found. Please install version" \
- "1.13.1 or later of the debianutils package."
- readlink () {
- # returns what symlink in $1 actually points to
- perl -e '$l = shift; exit 1 unless -l $l; $r = readlink $l; exit 1 unless $r; print "$r\n"' "$1"
- }
-fi
-
check_symlink () {
# syntax: check_symlink symlink
#
commit 7deebf983f53c505bc25171ab77fdc408f250a6e
Author: Julien Cristau <jcristau@debian.org>
Date: Tue May 26 15:58:19 2009 +0200
xsfbs: don't run dpkg --print-installation-architecture
This is deprecated in new dpkg, and had no users anyway.
diff --git a/debian/xsfbs/xsfbs.sh b/debian/xsfbs/xsfbs.sh
index 8840ff9..197eb74 100644
--- a/debian/xsfbs/xsfbs.sh
+++ b/debian/xsfbs/xsfbs.sh
@@ -57,8 +57,6 @@ EOF
exit $SHELL_LIB_USAGE_ERROR
fi
-ARCHITECTURE="$(dpkg --print-installation-architecture)"
-
if [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
RECONFIGURE="true"
else
commit 4178d948cd66a938222d0d7c6353ee8d60229e40
Author: David Nusinow <dnusinow@debian.org>
Date: Mon May 25 20:08:50 2009 -0400
Add README.source
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..34ab4bf
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,73 @@
+------------------------------------------------------
+Quick Guide To Patching This Package For The Impatient
+------------------------------------------------------
+
+1. Make sure you have quilt installed
+2. Unpack the package as usual with "dpkg-source -x"
+3. Run the "patch" target in debian/rules
+4. Create a new patch with "quilt new" (see quilt(1))
+5. Edit all the files you want to include in the patch with "quilt edit"
+ (see quilt(1)).
+6. Write the patch with "quilt refresh" (see quilt(1))
+7. Run the "clean" target in debian/rules
+
+Alternatively, instead of using quilt directly, you can drop the patch in to
+debian/patches and add the name of the patch to debian/patches/series.
+
+------------------------------------
+Guide To The X Strike Force Packages
+------------------------------------
+
+The X Strike Force team maintains X packages in git repositories on
+git.debian.org in the pkg-xorg subdirectory. Most upstream packages
+are actually maintained in git repositories as well, so they often
+just need to be pulled into git.debian.org in a "upstream-*" branch.
+Otherwise, the upstream sources are manually installed in the Debian
+git repository.
+
+The .orig.tar.gz upstream source file could be generated this
+"upstream-*" branch in the Debian git repository but it is actually
+copied from upstream tarballs directly.
+
+Due to X.org being highly modular, packaging all X.org applications
+as their own independent packages would have created too many Debian
+packages. For this reason, some X.org applications have been grouped
+into larger packages: xutils, xutils-dev, x11-apps, x11-session-utils,
+x11-utils, x11-xfs-utils, x11-xkb-utils, x11-xserver-utils.
+Most packages, including the X.org server itself and all libraries
+and drivers are, however maintained independently.
+
+The Debian packaging is added by creating the "debian-*" git branch
+which contains the aforementioned "upstream-*" branch plus the debian/
+repository files.
+When a patch has to be applied to the Debian package, two solutions
+are involved:
+* If the patch is available in one of the upstream branches, it
+ may be git'cherry-picked into the Debian repository. In this
+ case, it appears directly in the .diff.gz.
+* Otherwise, the patch is added to debian/patches/ which is managed
+ with quilt as documented in /usr/share/doc/quilt/README.source.
+
+quilt is actually invoked by the Debian X packaging through a larger
+set of scripts called XSFBS. XSFBS brings some other X specific
+features such as managing dependencies and conflicts due to the video
+and input driver ABIs.
+XSFBS itself is maintained in a separate repository at
+ git://git.debian.org/pkg-xorg/xsfbs.git
+and it is pulled inside the other Debian X repositories when needed.
+
+The XSFBS patching system requires a build dependency on quilt. Also
+a dependency on $(STAMP_DIR)/patch has to be added to debian/rules
+so that the XSFBS patching occurs before the actual build. So the
+very first target of the build (likely the one running autoreconf)
+should depend on $(STAMP_DIR)/patch. It should also not depend on
+anything so that parallel builds are correctly supported (nothing
+should probably run while patching is being done). And finally, the
+clean target should depend on the xsfclean target so that patches
+are unapplied on clean.
+
+When the upstream sources contain some DFSG-nonfree files, they are
+listed in text files in debian/prune/ in the "debian-*" branch of
+the Debian repository. XSFBS' scripts then take care of removing
+these listed files during the build so as to generate a modified
+DFSG-free .orig.tar.gz tarball.
commit fa6396d6bf68b9a0154089146287245f9ad60a1e
Author: Julien Cristau <jcristau@debian.org>
Date: Wed Feb 25 21:31:03 2009 +0100
xsfbs: repack.sh needs to be executable
diff --git a/debian/xsfbs/repack.sh b/debian/xsfbs/repack.sh
old mode 100644
new mode 100755
Reply to: