diff options
Diffstat (limited to 'xorg-server/Xi')
-rw-r--r-- | xorg-server/Xi/exevents.c | 6 | ||||
-rw-r--r-- | xorg-server/Xi/extinit.c | 38 | ||||
-rw-r--r-- | xorg-server/Xi/xiproperty.c | 253 |
3 files changed, 152 insertions, 145 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 9f6ec84b9..494d07e20 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -1888,6 +1888,12 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, if (normal_end) listener->state = LISTENER_HAS_END; } + else if (ev->device_event.flags & TOUCH_ACCEPT) { + /* Touch has been accepted by its owner, which is not this listener */ + if (listener->state != LISTENER_HAS_END) + rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev); + listener->state = LISTENER_HAS_END; + } out: return rc; diff --git a/xorg-server/Xi/extinit.c b/xorg-server/Xi/extinit.c index eac2586ed..7e3075551 100644 --- a/xorg-server/Xi/extinit.c +++ b/xorg-server/Xi/extinit.c @@ -158,25 +158,25 @@ static struct dev_type { Atom type; const char *name; } dev_type[] = { - { - 0, XI_KEYBOARD}, { - 0, XI_MOUSE}, { - 0, XI_TABLET}, { - 0, XI_TOUCHSCREEN}, { - 0, XI_TOUCHPAD}, { - 0, XI_BARCODE}, { - 0, XI_BUTTONBOX}, { - 0, XI_KNOB_BOX}, { - 0, XI_ONE_KNOB}, { - 0, XI_NINE_KNOB}, { - 0, XI_TRACKBALL}, { - 0, XI_QUADRATURE}, { - 0, XI_ID_MODULE}, { - 0, XI_SPACEBALL}, { - 0, XI_DATAGLOVE}, { - 0, XI_EYETRACKER}, { - 0, XI_CURSORKEYS}, { -0, XI_FOOTMOUSE}}; + {0, XI_KEYBOARD}, + {0, XI_MOUSE}, + {0, XI_TABLET}, + {0, XI_TOUCHSCREEN}, + {0, XI_TOUCHPAD}, + {0, XI_BARCODE}, + {0, XI_BUTTONBOX}, + {0, XI_KNOB_BOX}, + {0, XI_ONE_KNOB}, + {0, XI_NINE_KNOB}, + {0, XI_TRACKBALL}, + {0, XI_QUADRATURE}, + {0, XI_ID_MODULE}, + {0, XI_SPACEBALL}, + {0, XI_DATAGLOVE}, + {0, XI_EYETRACKER}, + {0, XI_CURSORKEYS}, + {0, XI_FOOTMOUSE} +}; CARD8 event_base[numInputClasses]; XExtEventInfo EventInfo[32]; 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; } } |