mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-28 13:20:46 +01:00
Compare commits
12 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
568be0867f | ||
|
|
0d5d367a82 | ||
|
|
0694e46ccf | ||
|
|
97ff0002e9 | ||
|
|
23bacd16c3 | ||
|
|
5acd9a373b | ||
|
|
e2c54e1db2 | ||
|
|
dca3360866 | ||
|
|
c69a5bb785 | ||
|
|
58f6eed9db | ||
|
|
544d4b6b74 | ||
|
|
31ffda96fa |
9 changed files with 86 additions and 13 deletions
|
|
@ -2,7 +2,7 @@ AC_PREREQ([2.64])
|
||||||
|
|
||||||
m4_define([libinput_major_version], [1])
|
m4_define([libinput_major_version], [1])
|
||||||
m4_define([libinput_minor_version], [3])
|
m4_define([libinput_minor_version], [3])
|
||||||
m4_define([libinput_micro_version], [0])
|
m4_define([libinput_micro_version], [1])
|
||||||
m4_define([libinput_version],
|
m4_define([libinput_version],
|
||||||
[libinput_major_version.libinput_minor_version.libinput_micro_version])
|
[libinput_major_version.libinput_minor_version.libinput_micro_version])
|
||||||
|
|
||||||
|
|
@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
|
||||||
# b) If interfaces have been changed or added, but binary compatibility has
|
# b) If interfaces have been changed or added, but binary compatibility has
|
||||||
# been preserved, change to C+1:0:A+1
|
# been preserved, change to C+1:0:A+1
|
||||||
# c) If the interface is the same as the previous version, change to C:R+1:A
|
# c) If the interface is the same as the previous version, change to C:R+1:A
|
||||||
LIBINPUT_LT_VERSION=18:3:8
|
LIBINPUT_LT_VERSION=18:4:8
|
||||||
AC_SUBST(LIBINPUT_LT_VERSION)
|
AC_SUBST(LIBINPUT_LT_VERSION)
|
||||||
|
|
||||||
AM_SILENT_RULES([yes])
|
AM_SILENT_RULES([yes])
|
||||||
|
|
|
||||||
|
|
@ -37,17 +37,25 @@ diagram_files = \
|
||||||
$(srcdir)/dot/libinput-stack-xorg.gv \
|
$(srcdir)/dot/libinput-stack-xorg.gv \
|
||||||
$(srcdir)/dot/libinput-stack-gnome.gv \
|
$(srcdir)/dot/libinput-stack-gnome.gv \
|
||||||
$(srcdir)/dot/evemu.gv \
|
$(srcdir)/dot/evemu.gv \
|
||||||
$(srcdir)/svg/software-buttons.svg \
|
|
||||||
$(srcdir)/svg/clickfinger.svg \
|
|
||||||
$(srcdir)/svg/button-scrolling.svg \
|
$(srcdir)/svg/button-scrolling.svg \
|
||||||
|
$(srcdir)/svg/clickfinger.svg \
|
||||||
|
$(srcdir)/svg/clickfinger-distance.svg \
|
||||||
$(srcdir)/svg/edge-scrolling.svg \
|
$(srcdir)/svg/edge-scrolling.svg \
|
||||||
|
$(srcdir)/svg/gesture-2fg-ambiguity.svg \
|
||||||
$(srcdir)/svg/palm-detection.svg \
|
$(srcdir)/svg/palm-detection.svg \
|
||||||
$(srcdir)/svg/pinch-gestures.svg \
|
$(srcdir)/svg/pinch-gestures.svg \
|
||||||
|
$(srcdir)/svg/pinch-gestures-softbuttons.svg \
|
||||||
$(srcdir)/svg/ptraccel-linear.svg \
|
$(srcdir)/svg/ptraccel-linear.svg \
|
||||||
$(srcdir)/svg/ptraccel-low-dpi.svg \
|
$(srcdir)/svg/ptraccel-low-dpi.svg \
|
||||||
$(srcdir)/svg/ptraccel-touchpad.svg \
|
$(srcdir)/svg/ptraccel-touchpad.svg \
|
||||||
$(srcdir)/svg/ptraccel-trackpoint.svg \
|
$(srcdir)/svg/ptraccel-trackpoint.svg \
|
||||||
|
$(srcdir)/svg/software-buttons.svg \
|
||||||
$(srcdir)/svg/swipe-gestures.svg \
|
$(srcdir)/svg/swipe-gestures.svg \
|
||||||
|
$(srcdir)/svg/tablet-axes.svg \
|
||||||
|
$(srcdir)/svg/tablet-interfaces.svg \
|
||||||
|
$(srcdir)/svg/tablet-left-handed.svg \
|
||||||
|
$(srcdir)/svg/tablet-out-of-bounds.svg \
|
||||||
|
$(srcdir)/svg/tablet.svg \
|
||||||
$(srcdir)/svg/tap-n-drag.svg \
|
$(srcdir)/svg/tap-n-drag.svg \
|
||||||
$(srcdir)/svg/thumb-detection.svg \
|
$(srcdir)/svg/thumb-detection.svg \
|
||||||
$(srcdir)/svg/top-software-buttons.svg \
|
$(srcdir)/svg/top-software-buttons.svg \
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ tp_gesture_handle_state_none(struct tp_dispatch *tp, uint64_t time)
|
||||||
if (ntouches == 2)
|
if (ntouches == 2)
|
||||||
return GESTURE_STATE_SCROLL;
|
return GESTURE_STATE_SCROLL;
|
||||||
else
|
else
|
||||||
return GESTURE_STATE_SWIPE;
|
return GESTURE_STATE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
first = touches[0];
|
first = touches[0];
|
||||||
|
|
|
||||||
|
|
@ -928,6 +928,7 @@ tp_detect_jumps(const struct tp_dispatch *tp, struct tp_touch *t)
|
||||||
static void
|
static void
|
||||||
tp_process_state(struct tp_dispatch *tp, uint64_t time)
|
tp_process_state(struct tp_dispatch *tp, uint64_t time)
|
||||||
{
|
{
|
||||||
|
struct evdev_device *device = tp->device;
|
||||||
struct tp_touch *t;
|
struct tp_touch *t;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
bool restart_filter = false;
|
bool restart_filter = false;
|
||||||
|
|
@ -953,7 +954,8 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time)
|
||||||
if (!t->dirty)
|
if (!t->dirty)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (t->pressure_delta < -7)
|
if ((device->model_flags & EVDEV_MODEL_LENOVO_T450_TOUCHPAD) &&
|
||||||
|
t->pressure_delta < -7)
|
||||||
tp_motion_history_reset(t);
|
tp_motion_history_reset(t);
|
||||||
|
|
||||||
if (tp_detect_jumps(tp, t)) {
|
if (tp_detect_jumps(tp, t)) {
|
||||||
|
|
|
||||||
|
|
@ -403,6 +403,10 @@ pad_process(struct evdev_dispatch *dispatch,
|
||||||
case EV_SYN:
|
case EV_SYN:
|
||||||
pad_flush(pad, device, time);
|
pad_flush(pad, device, time);
|
||||||
break;
|
break;
|
||||||
|
case EV_MSC:
|
||||||
|
/* The EKR sends the serial as MSC_SERIAL, ignore this for
|
||||||
|
* now */
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
log_error(device->base.seat->libinput,
|
log_error(device->base.seat->libinput,
|
||||||
"Unexpected event type %s (%#x)\n",
|
"Unexpected event type %s (%#x)\n",
|
||||||
|
|
|
||||||
|
|
@ -568,7 +568,11 @@ get_key_type(uint16_t code)
|
||||||
return EVDEV_KEY_TYPE_BUTTON;
|
return EVDEV_KEY_TYPE_BUTTON;
|
||||||
if (code >= KEY_OK && code <= KEY_LIGHTS_TOGGLE)
|
if (code >= KEY_OK && code <= KEY_LIGHTS_TOGGLE)
|
||||||
return EVDEV_KEY_TYPE_KEY;
|
return EVDEV_KEY_TYPE_KEY;
|
||||||
if (code >= BTN_DPAD_UP && code <= BTN_TRIGGER_HAPPY40)
|
if (code >= BTN_DPAD_UP && code <= BTN_DPAD_RIGHT)
|
||||||
|
return EVDEV_KEY_TYPE_BUTTON;
|
||||||
|
if (code >= KEY_ALS_TOGGLE && code <= KEY_KBDINPUTASSIST_CANCEL)
|
||||||
|
return EVDEV_KEY_TYPE_KEY;
|
||||||
|
if (code >= BTN_TRIGGER_HAPPY && code <= BTN_TRIGGER_HAPPY40)
|
||||||
return EVDEV_KEY_TYPE_BUTTON;
|
return EVDEV_KEY_TYPE_BUTTON;
|
||||||
return EVDEV_KEY_TYPE_NONE;
|
return EVDEV_KEY_TYPE_NONE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1889,10 +1889,13 @@ libinput_event_tablet_tool_get_y_transformed(struct libinput_event_tablet_tool *
|
||||||
*
|
*
|
||||||
* Returns the tool that was in use during this event.
|
* Returns the tool that was in use during this event.
|
||||||
*
|
*
|
||||||
* If the caller holds at least one reference (see
|
* The returned tablet tool is not refcounted and may become invalid after
|
||||||
* libinput_tablet_tool_ref()), this struct is used whenever the
|
* the next call to libinput. Use libinput_tablet_tool_ref() and
|
||||||
* tools enters proximity. Otherwise, if no references remain when the tool
|
* libinput_tablet_tool_unref() to continue using the handle outside of the
|
||||||
* leaves proximity, the tool may be destroyed.
|
* immediate scope.
|
||||||
|
*
|
||||||
|
* If the caller holds at least one reference, this struct is used
|
||||||
|
* whenever the tools enters proximity again.
|
||||||
*
|
*
|
||||||
* @note Physical tool tracking requires hardware support. If unavailable,
|
* @note Physical tool tracking requires hardware support. If unavailable,
|
||||||
* libinput creates one tool per type per tablet. See @ref
|
* libinput creates one tool per type per tablet. See @ref
|
||||||
|
|
@ -1999,7 +2002,7 @@ libinput_event_tablet_tool_get_time_usec(struct libinput_event_tablet_tool *even
|
||||||
/**
|
/**
|
||||||
* @ingroup event_tablet
|
* @ingroup event_tablet
|
||||||
*
|
*
|
||||||
* Return the type of tool type for a tool object, see @ref
|
* Return the tool type for a tool object, see @ref
|
||||||
* tablet-tool-types for details.
|
* tablet-tool-types for details.
|
||||||
*
|
*
|
||||||
* @param tool The libinput tool
|
* @param tool The libinput tool
|
||||||
|
|
@ -2047,7 +2050,8 @@ libinput_tablet_tool_ref(struct libinput_tablet_tool *tool);
|
||||||
* @ingroup event_tablet
|
* @ingroup event_tablet
|
||||||
*
|
*
|
||||||
* Decrement the reference count of the tool by one. When the reference
|
* Decrement the reference count of the tool by one. When the reference
|
||||||
* count of tool reaches 0, the memory allocated for tool will be freed.
|
* count of the tool reaches 0, the memory allocated for the tool will be
|
||||||
|
* freed.
|
||||||
*
|
*
|
||||||
* @param tool The tool to decrement the ref count of
|
* @param tool The tool to decrement the ref count of
|
||||||
* @return NULL if the tool was destroyed otherwise the passed tool
|
* @return NULL if the tool was destroyed otherwise the passed tool
|
||||||
|
|
@ -3065,6 +3069,11 @@ libinput_device_get_output_name(struct libinput_device *device);
|
||||||
* seat name pair at any given time, but if no external reference is kept, it
|
* seat name pair at any given time, but if no external reference is kept, it
|
||||||
* may be destroyed if no device belonging to it is left.
|
* may be destroyed if no device belonging to it is left.
|
||||||
*
|
*
|
||||||
|
* The returned seat is not refcounted and may become invalid after
|
||||||
|
* the next call to libinput. Use libinput_seat_ref() and
|
||||||
|
* libinput_seat_unref() to continue using the handle outside of the
|
||||||
|
* immediate scope.
|
||||||
|
*
|
||||||
* @param device A previously obtained device
|
* @param device A previously obtained device
|
||||||
* @return The seat this input device belongs to
|
* @return The seat this input device belongs to
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -342,6 +342,42 @@ START_TEST(keyboard_time_usec)
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
START_TEST(keyboard_no_buttons)
|
||||||
|
{
|
||||||
|
struct litest_device *dev = litest_current_device();
|
||||||
|
struct libinput *li = dev->libinput;
|
||||||
|
struct libinput_event *event;
|
||||||
|
int code;
|
||||||
|
const char *name;
|
||||||
|
|
||||||
|
litest_drain_events(dev->libinput);
|
||||||
|
|
||||||
|
for (code = 0; code < KEY_MAX; code++) {
|
||||||
|
if (!libevdev_has_event_code(dev->evdev, EV_KEY, code))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
name = libevdev_event_code_get_name(EV_KEY, code);
|
||||||
|
if (!name || !strneq(name, "KEY_", 4))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
litest_keyboard_key(dev, code, true);
|
||||||
|
litest_keyboard_key(dev, code, false);
|
||||||
|
libinput_dispatch(li);
|
||||||
|
|
||||||
|
event = libinput_get_event(li);
|
||||||
|
litest_is_keyboard_event(event,
|
||||||
|
code,
|
||||||
|
LIBINPUT_KEY_STATE_PRESSED);
|
||||||
|
libinput_event_destroy(event);
|
||||||
|
event = libinput_get_event(li);
|
||||||
|
litest_is_keyboard_event(event,
|
||||||
|
code,
|
||||||
|
LIBINPUT_KEY_STATE_RELEASED);
|
||||||
|
libinput_event_destroy(event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
void
|
void
|
||||||
litest_setup_tests(void)
|
litest_setup_tests(void)
|
||||||
{
|
{
|
||||||
|
|
@ -351,4 +387,6 @@ litest_setup_tests(void)
|
||||||
litest_add("keyboard:keys", keyboard_has_key, LITEST_KEYS, LITEST_ANY);
|
litest_add("keyboard:keys", keyboard_has_key, LITEST_KEYS, LITEST_ANY);
|
||||||
litest_add("keyboard:keys", keyboard_keys_bad_device, LITEST_ANY, LITEST_ANY);
|
litest_add("keyboard:keys", keyboard_keys_bad_device, LITEST_ANY, LITEST_ANY);
|
||||||
litest_add("keyboard:time", keyboard_time_usec, LITEST_KEYS, LITEST_ANY);
|
litest_add("keyboard:time", keyboard_time_usec, LITEST_KEYS, LITEST_ANY);
|
||||||
|
|
||||||
|
litest_add("keyboard:events", keyboard_no_buttons, LITEST_KEYS, LITEST_ANY);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,10 @@ libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:800
|
||||||
libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800
|
libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800
|
||||||
LIBINPUT_ATTR_SIZE_HINT=100x55
|
LIBINPUT_ATTR_SIZE_HINT=100x55
|
||||||
|
|
||||||
|
libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:300
|
||||||
|
libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:300
|
||||||
|
LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1
|
||||||
|
|
||||||
libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:310
|
libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:310
|
||||||
libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:310
|
libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:310
|
||||||
LIBINPUT_MODEL_ALPS_RUSHMORE=1
|
LIBINPUT_MODEL_ALPS_RUSHMORE=1
|
||||||
|
|
@ -115,6 +119,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPad??60*:
|
||||||
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:*
|
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:*
|
||||||
LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1
|
LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1
|
||||||
|
|
||||||
|
# Lenovo Yoga 2013
|
||||||
|
libinput:name:*SynPS/2 Synaptics TouchPad*:dmi:*svnLENOVO*pvrLenovoYoga213:*
|
||||||
|
LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# Synaptics
|
# Synaptics
|
||||||
##########################################
|
##########################################
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue