aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-03-09 09:05:10 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-03-09 09:23:57 +1000
commit2c49e21a815632fc1addd04dde96592237757a2e (patch)
tree7594c99ca913a701162878d348df99144ce7e84d
parentFix duplicate wheel button up mapping. (diff)
downloadxf86-input-evdev-2c49e21a815632fc1addd04dde96592237757a2e.tar.gz
xf86-input-evdev-2c49e21a815632fc1addd04dde96592237757a2e.tar.bz2
xf86-input-evdev-2c49e21a815632fc1addd04dde96592237757a2e.zip
Check button label before fetching the Atom from the server. (#20524)
The server doesn't like NULL names, so don't call XIGetKnownProperty for labels that don't exist. X.Org Bug 20524 <http://bugs.freedesktop.org/show_bug.cgi?id=20524> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Peter Henriksson
-rw-r--r--src/evdev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 519fd6a..04bce96 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2002,6 +2002,9 @@ EvdevInitProperty(DeviceIntPtr dev)
int group = (button % 0x100)/16;
int idx = button - ((button/16) * 16);
+ if (!btn_labels[group][idx])
+ continue;
+
atom = XIGetKnownProperty(btn_labels[group][idx]);
if (!atom)
continue;