From 0a79bc28c7ebd4d3060f92dfd8893c6b981239e8 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 4 Jul 2024 22:51:07 +0200 Subject: [PATCH] build: require libinput v1.19 This version has been published back in 2021. --- backend/libinput/events.c | 7 ------- backend/libinput/meson.build | 5 +---- backend/libinput/pointer.c | 2 -- include/backend/libinput.h | 2 -- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/backend/libinput/events.c b/backend/libinput/events.c index 91511f47..6cfe34e0 100644 --- a/backend/libinput/events.c +++ b/backend/libinput/events.c @@ -167,12 +167,8 @@ void handle_libinput_event(struct wlr_libinput_backend *backend, handle_pointer_button(event, &dev->pointer); break; case LIBINPUT_EVENT_POINTER_AXIS: -#if !HAVE_LIBINPUT_SCROLL_VALUE120 /* This event must be ignored in favour of the SCROLL_* events */ - handle_pointer_axis(event, &dev->pointer); -#endif break; -#if HAVE_LIBINPUT_SCROLL_VALUE120 case LIBINPUT_EVENT_POINTER_SCROLL_WHEEL: handle_pointer_axis_value120(event, &dev->pointer, WL_POINTER_AXIS_SOURCE_WHEEL); @@ -185,7 +181,6 @@ void handle_libinput_event(struct wlr_libinput_backend *backend, handle_pointer_axis_value120(event, &dev->pointer, WL_POINTER_AXIS_SOURCE_CONTINUOUS); break; -#endif case LIBINPUT_EVENT_TOUCH_DOWN: handle_touch_down(event, &dev->touch); break; @@ -243,14 +238,12 @@ void handle_libinput_event(struct wlr_libinput_backend *backend, case LIBINPUT_EVENT_GESTURE_PINCH_END: handle_pointer_pinch_end(event, &dev->pointer); break; -#if HAVE_LIBINPUT_HOLD_GESTURES case LIBINPUT_EVENT_GESTURE_HOLD_BEGIN: handle_pointer_hold_begin(event, &dev->pointer); break; case LIBINPUT_EVENT_GESTURE_HOLD_END: handle_pointer_hold_end(event, &dev->pointer); break; -#endif default: wlr_log(WLR_DEBUG, "Unknown libinput event %d", event_type); break; diff --git a/backend/libinput/meson.build b/backend/libinput/meson.build index 0dfac5dd..c244eb77 100644 --- a/backend/libinput/meson.build +++ b/backend/libinput/meson.build @@ -5,7 +5,7 @@ endif libinput = dependency( 'libinput', - version: '>=1.14.0', + version: '>=1.19.0', required: 'libinput' in backends, not_found_message: '\n'.join(msg), ) @@ -28,7 +28,4 @@ wlr_files += files( features += { 'libinput-backend': true } wlr_deps += libinput -# libinput hold gestures and high resolution scroll are available since 1.19.0 -internal_config.set10('HAVE_LIBINPUT_HOLD_GESTURES', libinput.version().version_compare('>=1.19.0')) -internal_config.set10('HAVE_LIBINPUT_SCROLL_VALUE120', libinput.version().version_compare('>=1.19.0')) internal_config.set10('HAVE_LIBINPUT_BUSTYPE', libinput.version().version_compare('>=1.26.0')) diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c index 034b178a..1fe3d479 100644 --- a/backend/libinput/pointer.c +++ b/backend/libinput/pointer.c @@ -136,7 +136,6 @@ void handle_pointer_axis(struct libinput_event *event, wl_signal_emit_mutable(&pointer->events.frame, pointer); } -#if HAVE_LIBINPUT_SCROLL_VALUE120 void handle_pointer_axis_value120(struct libinput_event *event, struct wlr_pointer *pointer, enum wl_pointer_axis_source source) { struct libinput_event_pointer *pevent = @@ -173,7 +172,6 @@ void handle_pointer_axis_value120(struct libinput_event *event, } wl_signal_emit_mutable(&pointer->events.frame, pointer); } -#endif void handle_pointer_swipe_begin(struct libinput_event *event, struct wlr_pointer *pointer) { diff --git a/include/backend/libinput.h b/include/backend/libinput.h index bf5a306f..cf685f0e 100644 --- a/include/backend/libinput.h +++ b/include/backend/libinput.h @@ -71,10 +71,8 @@ void handle_pointer_button(struct libinput_event *event, struct wlr_pointer *pointer); void handle_pointer_axis(struct libinput_event *event, struct wlr_pointer *pointer); -#if HAVE_LIBINPUT_SCROLL_VALUE120 void handle_pointer_axis_value120(struct libinput_event *event, struct wlr_pointer *pointer, enum wl_pointer_axis_source source); -#endif void handle_pointer_swipe_begin(struct libinput_event *event, struct wlr_pointer *pointer); void handle_pointer_swipe_update(struct libinput_event *event,