summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-03 13:26:48 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-06 12:58:03 +1000
commit183c075d2f9d5f6effa1ce7ab135fb0c2e46085a (patch)
tree8451ebab684f0776af525001156eeb81f0838b4b
parent744bb559826ede37a77e9000b6c620eaa6a3c837 (diff)
dix: always init the full button map to default values (#22594)
Master devices must have the standard button map applied for all buttons to ensure buttons larger than 7 (the default for MDs) are mapped appropriately. We can't copy the button map from SDs to MDs since that breaks the chained button mapping. However, by ensuring all buttons (even non-existing ones) are mapped, devices that send such buttons continue to work. X.Org Bug 22594 <http://bugs.freedesktop.org/show_bug.cgi?id=22594> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--dix/devices.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dix/devices.c b/dix/devices.c
index e000f29ce..8fac981bf 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1172,6 +1172,8 @@ InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels,
butc->sourceid = dev->id;
for (i = 1; i <= numButtons; i++)
butc->map[i] = map[i];
+ for (i = numButtons + 1; i < MAP_LENGTH; i++)
+ butc->map[i] = i;
memcpy(butc->labels, labels, numButtons * sizeof(Atom));
dev->button = butc;
return TRUE;