mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 10:30:28 +01:00
quirks: add a quirk to monitor MSC_TIMESTAMP for pointer jumps
Currently enabled on all Dell i2c touchpads, these seem to be the ones that needed it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
06f8e02d00
commit
0e2f1babc5
4 changed files with 17 additions and 0 deletions
|
|
@ -5,6 +5,12 @@ MatchName=* Touchpad
|
|||
MatchDMIModalias=dmi:*svnDellInc.:*
|
||||
ModelTouchpadVisibleMarker=1
|
||||
|
||||
[Dell i2c Touchpads]
|
||||
MatchBus=i2c
|
||||
MatchUdevType=touchpad
|
||||
MatchDMIModalias=dmi:*svnDellInc.:*
|
||||
AttrMscTimestamp=watch
|
||||
|
||||
[Dell Lattitude E6220 Touchpad]
|
||||
MatchName=*AlpsPS/2 ALPS GlidePoint
|
||||
MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE6220:*
|
||||
|
|
|
|||
|
|
@ -269,6 +269,7 @@ quirk_get_name(enum quirk q)
|
|||
case QUIRK_ATTR_THUMB_PRESSURE_THRESHOLD: return "AttrThumbPressureThreshold";
|
||||
case QUIRK_ATTR_USE_VELOCITY_AVERAGING: return "AttrUseVelocityAveraging";
|
||||
case QUIRK_ATTR_THUMB_SIZE_THRESHOLD: return "AttrThumbSizeThreshold";
|
||||
case QUIRK_ATTR_MSC_TIMESTAMP: return "AttrMscTimestamp";
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
|
|
@ -744,6 +745,13 @@ parse_attr(struct quirks_context *ctx,
|
|||
p->type = PT_UINT;
|
||||
p->value.u = v;
|
||||
rc = true;
|
||||
} else if (streq(key, quirk_get_name(QUIRK_ATTR_MSC_TIMESTAMP))) {
|
||||
p->id = QUIRK_ATTR_MSC_TIMESTAMP;
|
||||
if (!streq(value, "watch"))
|
||||
goto out;
|
||||
p->type = PT_STRING;
|
||||
p->value.s = safe_strdup(value);
|
||||
rc = true;
|
||||
} else {
|
||||
qlog_error(ctx, "Unknown key %s in %s\n", key, s->name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ enum quirk {
|
|||
QUIRK_ATTR_THUMB_PRESSURE_THRESHOLD,
|
||||
QUIRK_ATTR_USE_VELOCITY_AVERAGING,
|
||||
QUIRK_ATTR_THUMB_SIZE_THRESHOLD,
|
||||
QUIRK_ATTR_MSC_TIMESTAMP,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -641,6 +641,7 @@ tools_list_device_quirks(struct quirks_context *ctx,
|
|||
QUIRK_ATTR_THUMB_PRESSURE_THRESHOLD,
|
||||
QUIRK_ATTR_USE_VELOCITY_AVERAGING,
|
||||
QUIRK_ATTR_THUMB_SIZE_THRESHOLD,
|
||||
QUIRK_ATTR_MSC_TIMESTAMP,
|
||||
};
|
||||
enum quirk *q;
|
||||
|
||||
|
|
@ -716,6 +717,7 @@ tools_list_device_quirks(struct quirks_context *ctx,
|
|||
case QUIRK_ATTR_LID_SWITCH_RELIABILITY:
|
||||
case QUIRK_ATTR_KEYBOARD_INTEGRATION:
|
||||
case QUIRK_ATTR_TPKBCOMBO_LAYOUT:
|
||||
case QUIRK_ATTR_MSC_TIMESTAMP:
|
||||
quirks_get_string(quirks, *q, &s);
|
||||
snprintf(buf, sizeof(buf), "%s=%s", name, s);
|
||||
callback(userdata, buf);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue