diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index 9fe69a5ad..7daf58461 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -126,7 +126,8 @@ ProcXChangeDeviceControl(ClientPtr client) .repType = X_Reply, .RepType = X_ChangeDeviceControl, .sequenceNumber = client->sequence, - .length = 0 + .length = 0, + .status = Success, }; switch (stuff->control) { diff --git a/Xi/exevents.c b/Xi/exevents.c index 6ed499142..4cbeb3796 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1862,6 +1862,11 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, goto out; } + if (listener->state == LISTENER_AWAITING_BEGIN) { + listener->state = LISTENER_HAS_END; + goto out; + } + /* Event in response to reject */ if (ev->device_event.flags & TOUCH_REJECT) { if (listener->state != LISTENER_HAS_END) diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index 43351bccc..796ba0948 100644 --- a/Xi/xiproperty.c +++ b/Xi/xiproperty.c @@ -105,6 +105,9 @@ static struct dev_properties { {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_MT_DISTANCE}, + {0, AXIS_LABEL_PROP_ABS_MT_TOOL_X}, + {0, AXIS_LABEL_PROP_ABS_MT_TOOL_Y}, {0, AXIS_LABEL_PROP_ABS_MISC}, {0, BTN_LABEL_PROP}, {0, BTN_LABEL_PROP_BTN_UNKNOWN}, diff --git a/dix/getevents.c b/dix/getevents.c index 71d83c4ba..8b4379d1c 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -1400,8 +1400,9 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, coordinates were. */ if (flags & POINTER_SCREEN) { - screenx = sx; - screeny = sy; + scr = miPointerGetScreen(pDev); + screenx = sx + scr->x; + screeny = sy + scr->y; } scr = positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative, diff --git a/dix/touch.c b/dix/touch.c index e64a6262c..5f77be575 100644 --- a/dix/touch.c +++ b/dix/touch.c @@ -572,8 +572,8 @@ TouchBuildSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, return FALSE; /* Mark which grabs/event selections we're delivering to: max one grab per - * window plus the bottom-most event selection. */ - ti->listeners = calloc(sprite->spriteTraceGood + 1, sizeof(*ti->listeners)); + * window plus the bottom-most event selection, plus any active grab. */ + ti->listeners = calloc(sprite->spriteTraceGood + 2, sizeof(*ti->listeners)); if (!ti->listeners) { sprite->spriteTraceGood = 0; return FALSE; diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 3ad34b543..9dabf103f 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -376,7 +376,7 @@ static void xf86ReleaseKeys(DeviceIntPtr pDev) { KeyClassPtr keyc; - int i, sigstate; + int i; if (!pDev || !pDev->key) return; diff --git a/include/xserver-properties.h b/include/xserver-properties.h index 85f2ce5c4..bf48fabe5 100644 --- a/include/xserver-properties.h +++ b/include/xserver-properties.h @@ -118,6 +118,9 @@ #define AXIS_LABEL_PROP_ABS_MT_BLOB_ID "Abs MT Blob ID" #define AXIS_LABEL_PROP_ABS_MT_TRACKING_ID "Abs MT Tracking ID" #define AXIS_LABEL_PROP_ABS_MT_PRESSURE "Abs MT Pressure" +#define AXIS_LABEL_PROP_ABS_MT_DISTANCE "Abs MT Distance" +#define AXIS_LABEL_PROP_ABS_MT_TOOL_X "Abs MT Tool X" +#define AXIS_LABEL_PROP_ABS_MT_TOOL_Y "Abs MT Tool Y" #define AXIS_LABEL_PROP_ABS_MISC "Abs Misc" /* Button names */ diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index 082c0db57..c1af32eb9 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -709,7 +709,7 @@ ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse) xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); DeviceEvent *event = &ev->device_event; - dev = IsFloating(mouse) ? mouse : GetMaster(mouse, MASTER_KEYBOARD); + dev = (IsMaster(mouse) || IsFloating(mouse)) ? mouse : GetMaster(mouse, MASTER_KEYBOARD); if (dev && dev->key) { xkbi = dev->key->xkbInfo;