mirror of
https://github.com/X11Libre/xf86-input-libinput.git
synced 2026-03-24 01:24:04 +00:00
drop compat with old inputproto < 2.3.99.1
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
8e29361dfd
commit
3d80bbef34
@@ -46,13 +46,9 @@ XORG_DEFAULT_OPTIONS
|
||||
CFLAGS="$CFLAGS -Wno-declaration-after-statement"
|
||||
|
||||
# Obtain compiler/linker options from server and required extensions
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 25.0.0] xproto [inputproto >= 2.2])
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 25.0.0] xproto [inputproto >= 2.3.99.1])
|
||||
PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.11.0])
|
||||
|
||||
PKG_CHECK_MODULES(INPUTPROTO24, [inputproto >= 2.3.99.1],
|
||||
[AC_DEFINE(HAVE_INPUTPROTO24, [1], [inputproto 2.4 is available])],
|
||||
[:])
|
||||
|
||||
OLD_LIBS=$LIBS
|
||||
OLD_CFLAGS=$CFLAGS
|
||||
LIBS="$LIBS $LIBINPUT_LIBS"
|
||||
|
||||
@@ -32,7 +32,7 @@ add_project_arguments(cc.get_supported_arguments(cflags), language: 'c')
|
||||
pkgconfig = import('pkgconfig')
|
||||
dep_xserver = dependency('xorg-server', version: '>= 1.19')
|
||||
dep_xproto = dependency('xproto')
|
||||
dep_inputproto = dependency('inputproto', version: '>= 2.2')
|
||||
dep_inputproto = dependency('inputproto', version: '>= 2.3.99.1')
|
||||
dep_libinput = dependency('libinput', version: '>= 1.11.0')
|
||||
|
||||
config_h = configuration_data()
|
||||
@@ -40,10 +40,6 @@ config_h.set('PACKAGE_VERSION_MAJOR', driver_version[0])
|
||||
config_h.set('PACKAGE_VERSION_MINOR', driver_version[1])
|
||||
config_h.set('PACKAGE_VERSION_PATCHLEVEL', driver_version[2])
|
||||
|
||||
if dep_inputproto.version().version_compare('>= 2.3.99.1')
|
||||
config_h.set('HAVE_INPUTPROTO24', 1)
|
||||
endif
|
||||
|
||||
if cc.has_function('libinput_device_config_scroll_get_button_lock',
|
||||
dependencies: dep_libinput)
|
||||
config_h.set('HAVE_LIBINPUT_SCROLL_BUTTON_LOCK', 1)
|
||||
|
||||
@@ -93,12 +93,6 @@ enum capabilities {
|
||||
CAP_GESTURE = 0x40,
|
||||
};
|
||||
|
||||
#if HAVE_INPUTPROTO24
|
||||
#if ABI_XINPUT_VERSION >= SET_ABI_VERSION(24, 4)
|
||||
#define HAVE_GESTURES
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct xf86libinput_driver {
|
||||
struct libinput *libinput;
|
||||
int device_enabled_count;
|
||||
@@ -1282,7 +1276,6 @@ xf86libinput_init_touch(InputInfoPtr pInfo)
|
||||
InitTouchClassDeviceStruct(dev, ntouches, XIDirectTouch, 2);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GESTURES
|
||||
static void
|
||||
xf86libinput_init_gesture(InputInfoPtr pInfo)
|
||||
{
|
||||
@@ -1290,7 +1283,6 @@ xf86libinput_init_gesture(InputInfoPtr pInfo)
|
||||
int ntouches = TOUCH_MAX_SLOTS;
|
||||
InitGestureClassDeviceStruct(dev, ntouches);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
xf86libinput_init_tablet_pen_or_eraser(InputInfoPtr pInfo,
|
||||
@@ -1541,10 +1533,8 @@ xf86libinput_init(DeviceIntPtr dev)
|
||||
}
|
||||
if (driver_data->capabilities & CAP_TOUCH)
|
||||
xf86libinput_init_touch(pInfo);
|
||||
#ifdef HAVE_GESTURES
|
||||
if (driver_data->capabilities & CAP_GESTURE)
|
||||
xf86libinput_init_gesture(pInfo);
|
||||
#endif
|
||||
if (driver_data->capabilities & CAP_TABLET_TOOL)
|
||||
xf86libinput_init_tablet(pInfo);
|
||||
if (driver_data->capabilities & CAP_TABLET_PAD)
|
||||
@@ -2019,7 +2009,6 @@ xf86libinput_handle_touch(InputInfoPtr pInfo,
|
||||
xf86PostTouchEvent(dev, touchids[slot], type, 0, m);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GESTURES
|
||||
static void
|
||||
xf86libinput_handle_gesture_swipe(InputInfoPtr pInfo,
|
||||
struct libinput_event_gesture *event,
|
||||
@@ -2097,7 +2086,6 @@ xf86libinput_handle_gesture_pinch(InputInfoPtr pInfo,
|
||||
libinput_event_gesture_get_scale(event),
|
||||
libinput_event_gesture_get_angle_delta(event));
|
||||
}
|
||||
#endif
|
||||
|
||||
static InputInfoPtr
|
||||
xf86libinput_pick_device(struct xf86libinput_device *shared_device,
|
||||
@@ -2696,20 +2684,16 @@ xf86libinput_handle_event(struct libinput_event *event)
|
||||
case LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN:
|
||||
case LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE:
|
||||
case LIBINPUT_EVENT_GESTURE_SWIPE_END:
|
||||
#ifdef HAVE_GESTURES
|
||||
xf86libinput_handle_gesture_swipe(pInfo,
|
||||
libinput_event_get_gesture_event(event),
|
||||
type);
|
||||
#endif
|
||||
break;
|
||||
case LIBINPUT_EVENT_GESTURE_PINCH_BEGIN:
|
||||
case LIBINPUT_EVENT_GESTURE_PINCH_UPDATE:
|
||||
case LIBINPUT_EVENT_GESTURE_PINCH_END:
|
||||
#ifdef HAVE_GESTURES
|
||||
xf86libinput_handle_gesture_pinch(pInfo,
|
||||
libinput_event_get_gesture_event(event),
|
||||
type);
|
||||
#endif
|
||||
break;
|
||||
case LIBINPUT_EVENT_TABLET_TOOL_AXIS:
|
||||
event_handling = xf86libinput_handle_tablet_axis(pInfo,
|
||||
@@ -3963,10 +3947,8 @@ xf86libinput_create_subdevice(InputInfoPtr pInfo,
|
||||
options = xf86ReplaceBoolOption(options, "_libinput/cap-pointer", 1);
|
||||
if (capabilities & CAP_TOUCH)
|
||||
options = xf86ReplaceBoolOption(options, "_libinput/cap-touch", 1);
|
||||
#ifdef HAVE_GESTURES
|
||||
if (capabilities & CAP_GESTURE)
|
||||
options = xf86ReplaceBoolOption(options, "_libinput/cap-gesture", 1);
|
||||
#endif
|
||||
if (capabilities & CAP_TABLET_TOOL)
|
||||
options = xf86ReplaceBoolOption(options, "_libinput/cap-tablet-tool", 1);
|
||||
if (capabilities & CAP_TABLET_PAD)
|
||||
@@ -4005,10 +3987,8 @@ caps_from_options(InputInfoPtr pInfo)
|
||||
capabilities |= CAP_POINTER;
|
||||
if (xf86CheckBoolOption(pInfo->options, "_libinput/cap-touch", 0))
|
||||
capabilities |= CAP_TOUCH;
|
||||
#ifdef HAVE_GESTURES
|
||||
if (xf86CheckBoolOption(pInfo->options, "_libinput/cap-gesture", 0))
|
||||
capabilities |= CAP_GESTURE;
|
||||
#endif
|
||||
if (xf86CheckBoolOption(pInfo->options, "_libinput/cap-tablet-tool", 0))
|
||||
capabilities |= CAP_TABLET_TOOL;
|
||||
|
||||
@@ -4154,10 +4134,8 @@ xf86libinput_pre_init(InputDriverPtr drv,
|
||||
driver_data->capabilities |= CAP_KEYBOARD;
|
||||
if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TOUCH))
|
||||
driver_data->capabilities |= CAP_TOUCH;
|
||||
#ifdef HAVE_GESTURES
|
||||
if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_GESTURE))
|
||||
driver_data->capabilities |= CAP_GESTURE;
|
||||
#endif
|
||||
if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TABLET_TOOL))
|
||||
driver_data->capabilities |= CAP_TABLET;
|
||||
if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TABLET_PAD))
|
||||
|
||||
Reference in New Issue
Block a user