mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
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 3c43d880f1)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user