Compare commits

...

3 Commits

Author SHA1 Message Date
callmetango
4eb6691efe release 25.0.1
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2026-02-02 18:22:27 +00:00
Tautvydas
868a03004e Revert "drop xorg-libinput.pc"
Apperently we cannot do this, because there are software which uses
xorg-libinput.pc in build system:
* KDE plasma-desktop uses for libinput-properties.h header detection
* LXQT uses for libinput-properties.h

Closes: https://github.com/X11Libre/xf86-input-libinput/issues/25

Signed-off-by: Tautvis <gtautvis@gmail.com>
2026-02-02 17:23:04 +01:00
Enrico Weigelt, metux IT consult
3d80bbef34 drop compat with old inputproto < 2.3.99.1
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 20:01:38 +01:00
5 changed files with 27 additions and 35 deletions

View File

@@ -27,6 +27,9 @@ DISTCHECK_CONFIGURE_FLAGS = --with-xorg-module-dir='$${libdir}/xorg/modules' \
SUBDIRS = src include man test
MAINTAINERCLEANFILES = ChangeLog INSTALL
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xorg-libinput.pc
dist_xorgconf_DATA = conf/40-libinput.conf
.PHONY: ChangeLog INSTALL

View File

@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xlibre-xf86-input-libinput],
[25.0.0],
[25.0.1],
[https://github.com/X11Libre/xf86-input-libinput/issues],
[xlibre-xf86-input-libinput])
AC_CONFIG_SRCDIR([Makefile.am])
@@ -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"
@@ -157,5 +153,5 @@ AC_CONFIG_FILES([Makefile
src/Makefile
man/Makefile
test/Makefile
])
xorg-libinput.pc])
AC_OUTPUT

View File

@@ -1,10 +1,11 @@
project('xf86-input-libinput', 'c',
version: '25.0.0',
version: '25.0.1',
default_options: ['warning_level=2'],
meson_version: '>= 0.50.0')
driver_version = meson.project_version().split('.')
dir_pkgconf = get_option('prefix') / get_option('libdir') / 'pkgconfig'
dir_man4 = get_option('prefix') / get_option('mandir') / 'man4'
cc = meson.get_compiler('c')
@@ -32,7 +33,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 +41,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)
@@ -127,6 +124,18 @@ test_draglock = executable('test-draglock',
install: false)
test('test-draglock', test_draglock)
conf_pkgconf = configuration_data()
conf_pkgconf.set('PACKAGE_VERSION', meson.project_version())
conf_pkgconf.set('sdkdir', dir_headers)
configure_file(
input: 'xorg-libinput.pc.in',
output: 'xorg-libinput.pc',
configuration: conf_pkgconf,
install_dir: dir_pkgconf,
)
config_man = configuration_data()
config_man.set('VERSION', '@0@ @1@'.format(meson.project_name(), meson.project_version()))

View File

@@ -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))

6
xorg-libinput.pc.in Normal file
View File

@@ -0,0 +1,6 @@
sdkdir=@sdkdir@
Name: xorg-libinput
Description: X.Org libinput input driver.
Version: @PACKAGE_VERSION@
Cflags: -I${sdkdir}