aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/xiproperty.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xi/xiproperty.c')
-rw-r--r--xorg-server/Xi/xiproperty.c253
1 files changed, 127 insertions, 126 deletions
diff --git a/xorg-server/Xi/xiproperty.c b/xorg-server/Xi/xiproperty.c
index ca731042c..43351bccc 100644
--- a/xorg-server/Xi/xiproperty.c
+++ b/xorg-server/Xi/xiproperty.c
@@ -49,132 +49,131 @@ static struct dev_properties {
Atom type;
const char *name;
} dev_properties[] = {
- {
- 0, XI_PROP_ENABLED}, {
- 0, XI_PROP_XTEST_DEVICE}, {
- 0, XATOM_FLOAT}, {
- 0, ACCEL_PROP_PROFILE_NUMBER}, {
- 0, ACCEL_PROP_CONSTANT_DECELERATION}, {
- 0, ACCEL_PROP_ADAPTIVE_DECELERATION}, {
- 0, ACCEL_PROP_VELOCITY_SCALING}, {
- 0, AXIS_LABEL_PROP}, {
- 0, AXIS_LABEL_PROP_REL_X}, {
- 0, AXIS_LABEL_PROP_REL_Y}, {
- 0, AXIS_LABEL_PROP_REL_Z}, {
- 0, AXIS_LABEL_PROP_REL_RX}, {
- 0, AXIS_LABEL_PROP_REL_RY}, {
- 0, AXIS_LABEL_PROP_REL_RZ}, {
- 0, AXIS_LABEL_PROP_REL_HWHEEL}, {
- 0, AXIS_LABEL_PROP_REL_DIAL}, {
- 0, AXIS_LABEL_PROP_REL_WHEEL}, {
- 0, AXIS_LABEL_PROP_REL_MISC}, {
- 0, AXIS_LABEL_PROP_REL_VSCROLL}, {
- 0, AXIS_LABEL_PROP_REL_HSCROLL}, {
- 0, AXIS_LABEL_PROP_ABS_X}, {
- 0, AXIS_LABEL_PROP_ABS_Y}, {
- 0, AXIS_LABEL_PROP_ABS_Z}, {
- 0, AXIS_LABEL_PROP_ABS_RX}, {
- 0, AXIS_LABEL_PROP_ABS_RY}, {
- 0, AXIS_LABEL_PROP_ABS_RZ}, {
- 0, AXIS_LABEL_PROP_ABS_THROTTLE}, {
- 0, AXIS_LABEL_PROP_ABS_RUDDER}, {
- 0, AXIS_LABEL_PROP_ABS_WHEEL}, {
- 0, AXIS_LABEL_PROP_ABS_GAS}, {
- 0, AXIS_LABEL_PROP_ABS_BRAKE}, {
- 0, AXIS_LABEL_PROP_ABS_HAT0X}, {
- 0, AXIS_LABEL_PROP_ABS_HAT0Y}, {
- 0, AXIS_LABEL_PROP_ABS_HAT1X}, {
- 0, AXIS_LABEL_PROP_ABS_HAT1Y}, {
- 0, AXIS_LABEL_PROP_ABS_HAT2X}, {
- 0, AXIS_LABEL_PROP_ABS_HAT2Y}, {
- 0, AXIS_LABEL_PROP_ABS_HAT3X}, {
- 0, AXIS_LABEL_PROP_ABS_HAT3Y}, {
- 0, AXIS_LABEL_PROP_ABS_PRESSURE}, {
- 0, AXIS_LABEL_PROP_ABS_DISTANCE}, {
- 0, AXIS_LABEL_PROP_ABS_TILT_X}, {
- 0, AXIS_LABEL_PROP_ABS_TILT_Y}, {
- 0, AXIS_LABEL_PROP_ABS_TOOL_WIDTH}, {
- 0, AXIS_LABEL_PROP_ABS_VOLUME}, {
- 0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR}, {
- 0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR}, {
- 0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR}, {
- 0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR}, {
- 0, AXIS_LABEL_PROP_ABS_MT_ORIENTATION}, {
- 0, AXIS_LABEL_PROP_ABS_MT_POSITION_X}, {
- 0, AXIS_LABEL_PROP_ABS_MT_POSITION_Y}, {
- 0, AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE}, {
- 0, AXIS_LABEL_PROP_ABS_MT_BLOB_ID}, {
- 0, AXIS_LABEL_PROP_ABS_MT_TRACKING_ID}, {
- 0, AXIS_LABEL_PROP_ABS_MT_PRESSURE}, {
- 0, AXIS_LABEL_PROP_ABS_MISC}, {
- 0, BTN_LABEL_PROP}, {
- 0, BTN_LABEL_PROP_BTN_UNKNOWN}, {
- 0, BTN_LABEL_PROP_BTN_WHEEL_UP}, {
- 0, BTN_LABEL_PROP_BTN_WHEEL_DOWN}, {
- 0, BTN_LABEL_PROP_BTN_HWHEEL_LEFT}, {
- 0, BTN_LABEL_PROP_BTN_HWHEEL_RIGHT}, {
- 0, BTN_LABEL_PROP_BTN_0}, {
- 0, BTN_LABEL_PROP_BTN_1}, {
- 0, BTN_LABEL_PROP_BTN_2}, {
- 0, BTN_LABEL_PROP_BTN_3}, {
- 0, BTN_LABEL_PROP_BTN_4}, {
- 0, BTN_LABEL_PROP_BTN_5}, {
- 0, BTN_LABEL_PROP_BTN_6}, {
- 0, BTN_LABEL_PROP_BTN_7}, {
- 0, BTN_LABEL_PROP_BTN_8}, {
- 0, BTN_LABEL_PROP_BTN_9}, {
- 0, BTN_LABEL_PROP_BTN_LEFT}, {
- 0, BTN_LABEL_PROP_BTN_RIGHT}, {
- 0, BTN_LABEL_PROP_BTN_MIDDLE}, {
- 0, BTN_LABEL_PROP_BTN_SIDE}, {
- 0, BTN_LABEL_PROP_BTN_EXTRA}, {
- 0, BTN_LABEL_PROP_BTN_FORWARD}, {
- 0, BTN_LABEL_PROP_BTN_BACK}, {
- 0, BTN_LABEL_PROP_BTN_TASK}, {
- 0, BTN_LABEL_PROP_BTN_TRIGGER}, {
- 0, BTN_LABEL_PROP_BTN_THUMB}, {
- 0, BTN_LABEL_PROP_BTN_THUMB2}, {
- 0, BTN_LABEL_PROP_BTN_TOP}, {
- 0, BTN_LABEL_PROP_BTN_TOP2}, {
- 0, BTN_LABEL_PROP_BTN_PINKIE}, {
- 0, BTN_LABEL_PROP_BTN_BASE}, {
- 0, BTN_LABEL_PROP_BTN_BASE2}, {
- 0, BTN_LABEL_PROP_BTN_BASE3}, {
- 0, BTN_LABEL_PROP_BTN_BASE4}, {
- 0, BTN_LABEL_PROP_BTN_BASE5}, {
- 0, BTN_LABEL_PROP_BTN_BASE6}, {
- 0, BTN_LABEL_PROP_BTN_DEAD}, {
- 0, BTN_LABEL_PROP_BTN_A}, {
- 0, BTN_LABEL_PROP_BTN_B}, {
- 0, BTN_LABEL_PROP_BTN_C}, {
- 0, BTN_LABEL_PROP_BTN_X}, {
- 0, BTN_LABEL_PROP_BTN_Y}, {
- 0, BTN_LABEL_PROP_BTN_Z}, {
- 0, BTN_LABEL_PROP_BTN_TL}, {
- 0, BTN_LABEL_PROP_BTN_TR}, {
- 0, BTN_LABEL_PROP_BTN_TL2}, {
- 0, BTN_LABEL_PROP_BTN_TR2}, {
- 0, BTN_LABEL_PROP_BTN_SELECT}, {
- 0, BTN_LABEL_PROP_BTN_START}, {
- 0, BTN_LABEL_PROP_BTN_MODE}, {
- 0, BTN_LABEL_PROP_BTN_THUMBL}, {
- 0, BTN_LABEL_PROP_BTN_THUMBR}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_PEN}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_RUBBER}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_BRUSH}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_PENCIL}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_FINGER}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_MOUSE}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_LENS}, {
- 0, BTN_LABEL_PROP_BTN_TOUCH}, {
- 0, BTN_LABEL_PROP_BTN_STYLUS}, {
- 0, BTN_LABEL_PROP_BTN_STYLUS2}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP}, {
- 0, BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP}, {
- 0, BTN_LABEL_PROP_BTN_GEAR_DOWN}, {
- 0, BTN_LABEL_PROP_BTN_GEAR_UP}, {
- 0, XI_PROP_TRANSFORM}
+ {0, XI_PROP_ENABLED},
+ {0, XI_PROP_XTEST_DEVICE},
+ {0, XATOM_FLOAT},
+ {0, ACCEL_PROP_PROFILE_NUMBER},
+ {0, ACCEL_PROP_CONSTANT_DECELERATION},
+ {0, ACCEL_PROP_ADAPTIVE_DECELERATION},
+ {0, ACCEL_PROP_VELOCITY_SCALING},
+ {0, AXIS_LABEL_PROP},
+ {0, AXIS_LABEL_PROP_REL_X},
+ {0, AXIS_LABEL_PROP_REL_Y},
+ {0, AXIS_LABEL_PROP_REL_Z},
+ {0, AXIS_LABEL_PROP_REL_RX},
+ {0, AXIS_LABEL_PROP_REL_RY},
+ {0, AXIS_LABEL_PROP_REL_RZ},
+ {0, AXIS_LABEL_PROP_REL_HWHEEL},
+ {0, AXIS_LABEL_PROP_REL_DIAL},
+ {0, AXIS_LABEL_PROP_REL_WHEEL},
+ {0, AXIS_LABEL_PROP_REL_MISC},
+ {0, AXIS_LABEL_PROP_REL_VSCROLL},
+ {0, AXIS_LABEL_PROP_REL_HSCROLL},
+ {0, AXIS_LABEL_PROP_ABS_X},
+ {0, AXIS_LABEL_PROP_ABS_Y},
+ {0, AXIS_LABEL_PROP_ABS_Z},
+ {0, AXIS_LABEL_PROP_ABS_RX},
+ {0, AXIS_LABEL_PROP_ABS_RY},
+ {0, AXIS_LABEL_PROP_ABS_RZ},
+ {0, AXIS_LABEL_PROP_ABS_THROTTLE},
+ {0, AXIS_LABEL_PROP_ABS_RUDDER},
+ {0, AXIS_LABEL_PROP_ABS_WHEEL},
+ {0, AXIS_LABEL_PROP_ABS_GAS},
+ {0, AXIS_LABEL_PROP_ABS_BRAKE},
+ {0, AXIS_LABEL_PROP_ABS_HAT0X},
+ {0, AXIS_LABEL_PROP_ABS_HAT0Y},
+ {0, AXIS_LABEL_PROP_ABS_HAT1X},
+ {0, AXIS_LABEL_PROP_ABS_HAT1Y},
+ {0, AXIS_LABEL_PROP_ABS_HAT2X},
+ {0, AXIS_LABEL_PROP_ABS_HAT2Y},
+ {0, AXIS_LABEL_PROP_ABS_HAT3X},
+ {0, AXIS_LABEL_PROP_ABS_HAT3Y},
+ {0, AXIS_LABEL_PROP_ABS_PRESSURE},
+ {0, AXIS_LABEL_PROP_ABS_DISTANCE},
+ {0, AXIS_LABEL_PROP_ABS_TILT_X},
+ {0, AXIS_LABEL_PROP_ABS_TILT_Y},
+ {0, AXIS_LABEL_PROP_ABS_TOOL_WIDTH},
+ {0, AXIS_LABEL_PROP_ABS_VOLUME},
+ {0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR},
+ {0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR},
+ {0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR},
+ {0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR},
+ {0, AXIS_LABEL_PROP_ABS_MT_ORIENTATION},
+ {0, AXIS_LABEL_PROP_ABS_MT_POSITION_X},
+ {0, AXIS_LABEL_PROP_ABS_MT_POSITION_Y},
+ {0, AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE},
+ {0, AXIS_LABEL_PROP_ABS_MT_BLOB_ID},
+ {0, AXIS_LABEL_PROP_ABS_MT_TRACKING_ID},
+ {0, AXIS_LABEL_PROP_ABS_MT_PRESSURE},
+ {0, AXIS_LABEL_PROP_ABS_MISC},
+ {0, BTN_LABEL_PROP},
+ {0, BTN_LABEL_PROP_BTN_UNKNOWN},
+ {0, BTN_LABEL_PROP_BTN_WHEEL_UP},
+ {0, BTN_LABEL_PROP_BTN_WHEEL_DOWN},
+ {0, BTN_LABEL_PROP_BTN_HWHEEL_LEFT},
+ {0, BTN_LABEL_PROP_BTN_HWHEEL_RIGHT},
+ {0, BTN_LABEL_PROP_BTN_0},
+ {0, BTN_LABEL_PROP_BTN_1},
+ {0, BTN_LABEL_PROP_BTN_2},
+ {0, BTN_LABEL_PROP_BTN_3},
+ {0, BTN_LABEL_PROP_BTN_4},
+ {0, BTN_LABEL_PROP_BTN_5},
+ {0, BTN_LABEL_PROP_BTN_6},
+ {0, BTN_LABEL_PROP_BTN_7},
+ {0, BTN_LABEL_PROP_BTN_8},
+ {0, BTN_LABEL_PROP_BTN_9},
+ {0, BTN_LABEL_PROP_BTN_LEFT},
+ {0, BTN_LABEL_PROP_BTN_RIGHT},
+ {0, BTN_LABEL_PROP_BTN_MIDDLE},
+ {0, BTN_LABEL_PROP_BTN_SIDE},
+ {0, BTN_LABEL_PROP_BTN_EXTRA},
+ {0, BTN_LABEL_PROP_BTN_FORWARD},
+ {0, BTN_LABEL_PROP_BTN_BACK},
+ {0, BTN_LABEL_PROP_BTN_TASK},
+ {0, BTN_LABEL_PROP_BTN_TRIGGER},
+ {0, BTN_LABEL_PROP_BTN_THUMB},
+ {0, BTN_LABEL_PROP_BTN_THUMB2},
+ {0, BTN_LABEL_PROP_BTN_TOP},
+ {0, BTN_LABEL_PROP_BTN_TOP2},
+ {0, BTN_LABEL_PROP_BTN_PINKIE},
+ {0, BTN_LABEL_PROP_BTN_BASE},
+ {0, BTN_LABEL_PROP_BTN_BASE2},
+ {0, BTN_LABEL_PROP_BTN_BASE3},
+ {0, BTN_LABEL_PROP_BTN_BASE4},
+ {0, BTN_LABEL_PROP_BTN_BASE5},
+ {0, BTN_LABEL_PROP_BTN_BASE6},
+ {0, BTN_LABEL_PROP_BTN_DEAD},
+ {0, BTN_LABEL_PROP_BTN_A},
+ {0, BTN_LABEL_PROP_BTN_B},
+ {0, BTN_LABEL_PROP_BTN_C},
+ {0, BTN_LABEL_PROP_BTN_X},
+ {0, BTN_LABEL_PROP_BTN_Y},
+ {0, BTN_LABEL_PROP_BTN_Z},
+ {0, BTN_LABEL_PROP_BTN_TL},
+ {0, BTN_LABEL_PROP_BTN_TR},
+ {0, BTN_LABEL_PROP_BTN_TL2},
+ {0, BTN_LABEL_PROP_BTN_TR2},
+ {0, BTN_LABEL_PROP_BTN_SELECT},
+ {0, BTN_LABEL_PROP_BTN_START},
+ {0, BTN_LABEL_PROP_BTN_MODE},
+ {0, BTN_LABEL_PROP_BTN_THUMBL},
+ {0, BTN_LABEL_PROP_BTN_THUMBR},
+ {0, BTN_LABEL_PROP_BTN_TOOL_PEN},
+ {0, BTN_LABEL_PROP_BTN_TOOL_RUBBER},
+ {0, BTN_LABEL_PROP_BTN_TOOL_BRUSH},
+ {0, BTN_LABEL_PROP_BTN_TOOL_PENCIL},
+ {0, BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH},
+ {0, BTN_LABEL_PROP_BTN_TOOL_FINGER},
+ {0, BTN_LABEL_PROP_BTN_TOOL_MOUSE},
+ {0, BTN_LABEL_PROP_BTN_TOOL_LENS},
+ {0, BTN_LABEL_PROP_BTN_TOUCH},
+ {0, BTN_LABEL_PROP_BTN_STYLUS},
+ {0, BTN_LABEL_PROP_BTN_STYLUS2},
+ {0, BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP},
+ {0, BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP},
+ {0, BTN_LABEL_PROP_BTN_GEAR_DOWN},
+ {0, BTN_LABEL_PROP_BTN_GEAR_UP},
+ {0, XI_PROP_TRANSFORM}
};
static long XIPropHandlerID = 1;
@@ -771,6 +770,8 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
&new_value, checkonly);
if (checkonly && rc != Success) {
free(new_value.data);
+ if (add)
+ XIDestroyDeviceProperty(prop);
return rc;
}
}