mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 06:50:05 +01:00
meson.build: require libevdev 1.10
Released in 2020, that's plenty old enough now to get rid of an ifdef. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1250>
This commit is contained in:
parent
2e0c3c4af4
commit
2b22a0b4ba
4 changed files with 5 additions and 22 deletions
|
|
@ -163,9 +163,7 @@ config_h.set10('HAVE_INSTALLED_TESTS', get_option('install-tests'))
|
|||
pkgconfig = import('pkgconfig')
|
||||
dep_udev = dependency('libudev')
|
||||
dep_mtdev = dependency('mtdev', version : '>= 1.1.0')
|
||||
dep_libevdev = dependency('libevdev', version: '>= 1.9.0')
|
||||
config_h.set10('HAVE_LIBEVDEV_DISABLE_PROPERTY',
|
||||
dep_libevdev.version().version_compare('>= 1.9.902'))
|
||||
dep_libevdev = dependency('libevdev', version: '>= 1.10.0')
|
||||
|
||||
dep_lm = cc.find_library('m', required : false)
|
||||
dep_rt = cc.find_library('rt', required : false)
|
||||
|
|
|
|||
11
src/evdev.c
11
src/evdev.c
|
|
@ -2233,17 +2233,10 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
|
|||
unsigned int p = t->tuples[idx].first;
|
||||
bool enable = t->tuples[idx].second;
|
||||
|
||||
if (enable) {
|
||||
if (enable)
|
||||
libevdev_enable_property(device->evdev, p);
|
||||
}
|
||||
else {
|
||||
#if HAVE_LIBEVDEV_DISABLE_PROPERTY
|
||||
else
|
||||
libevdev_disable_property(device->evdev, p);
|
||||
#else
|
||||
evdev_log_error(device,
|
||||
"quirks: a quirk for this device requires newer libevdev than installed\n");
|
||||
#endif
|
||||
}
|
||||
evdev_log_debug(device,
|
||||
"quirks: %s %s (%#x)\n",
|
||||
enable ? "enabling" : "disabling",
|
||||
|
|
|
|||
|
|
@ -214,7 +214,6 @@ static const char quirk_file[] =
|
|||
"[litest Quirked keyboard disable F1-F3]\n"
|
||||
"MatchName=litest Quirked Keyboard\n"
|
||||
"AttrEventCode=-KEY_F1;-EV_KEY:0x3c;-KEY_F3\n"
|
||||
#if HAVE_LIBEVDEV_DISABLE_PROPERTY
|
||||
"\n"
|
||||
"[litest Quirked keyboard enable buttonpad]\n"
|
||||
"MatchName=litest Quirked Keyboard\n"
|
||||
|
|
@ -239,7 +238,6 @@ static const char quirk_file[] =
|
|||
"[litest Quirked keyboard enable semi-mt]\n"
|
||||
"MatchName=litest Quirked Keyboard\n"
|
||||
"AttrInputProp=+INPUT_PROP_SEMI_MT\n"
|
||||
#endif
|
||||
;
|
||||
|
||||
TEST_DEVICE(LITEST_KEYBOARD_QUIRKED,
|
||||
|
|
|
|||
|
|
@ -1400,15 +1400,13 @@ START_TEST(device_quirks)
|
|||
struct libinput_device *device;
|
||||
char **message;
|
||||
bool disable_key_f1 = false,
|
||||
enable_btn_left = false;
|
||||
#if HAVE_LIBEVDEV_DISABLE_PROPERTY
|
||||
bool disable_pointingstick = false,
|
||||
enable_btn_left = false,
|
||||
disable_pointingstick = false,
|
||||
enable_buttonpad = false,
|
||||
enable_direct = false,
|
||||
disable_direct = false,
|
||||
enable_semi_mt = false,
|
||||
disable_semi_mt = false;
|
||||
#endif
|
||||
|
||||
_litest_context_destroy_ struct libinput *li = litest_create_context();
|
||||
libinput_log_set_priority(li, LIBINPUT_LOG_PRIORITY_DEBUG);
|
||||
|
|
@ -1437,7 +1435,6 @@ START_TEST(device_quirks)
|
|||
disable_key_f1 = true;
|
||||
if (strstr(*message, "enabling EV_KEY BTN_LEFT"))
|
||||
enable_btn_left = true;
|
||||
#if HAVE_LIBEVDEV_DISABLE_PROPERTY
|
||||
if (strstr(*message, "enabling INPUT_PROP_BUTTONPAD"))
|
||||
enable_buttonpad = true;
|
||||
if (strstr(*message, "disabling INPUT_PROP_POINTING_STICK"))
|
||||
|
|
@ -1458,21 +1455,18 @@ START_TEST(device_quirks)
|
|||
litest_assert(!enable_semi_mt);
|
||||
disable_semi_mt = true;
|
||||
}
|
||||
#endif
|
||||
free(*message);
|
||||
message++;
|
||||
}
|
||||
|
||||
litest_assert(disable_key_f1);
|
||||
litest_assert(enable_btn_left);
|
||||
#if HAVE_LIBEVDEV_DISABLE_PROPERTY
|
||||
litest_assert(enable_buttonpad);
|
||||
litest_assert(disable_pointingstick);
|
||||
litest_assert(enable_direct);
|
||||
litest_assert(disable_direct);
|
||||
litest_assert(enable_semi_mt);
|
||||
litest_assert(disable_semi_mt);
|
||||
#endif
|
||||
|
||||
litest_disable_log_handler(li);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue