From 2f8778ca68c44dcd6c86fab25c33704d825201d6 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Thu, 9 Feb 2023 15:38:26 +0100 Subject: [PATCH] xwayland: wl_pointer.axis_v120 is no longer optional With Wayland 1.21 being our baseline, we do not need to compile wl_pointer.axis_v120 conditionally. Signed-off-by: Olivier Fourdan --- hw/xwayland/xwayland-input.c | 10 +--------- include/meson.build | 1 - include/xwayland-config.h.meson.in | 3 --- meson.build | 5 +---- 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 5892dd502..862544866 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -845,7 +845,6 @@ pointer_handle_axis_discrete(void *data, struct wl_pointer *wl_pointer, } } -#ifdef XWL_HAS_WL_POINTER_AXIS_V120 static void pointer_handle_axis_v120(void *data, struct wl_pointer *pointer, uint32_t axis, int32_t v120) @@ -863,7 +862,6 @@ pointer_handle_axis_v120(void *data, struct wl_pointer *pointer, break; } } -#endif static const struct wl_pointer_listener pointer_listener = { pointer_handle_enter, @@ -875,9 +873,7 @@ static const struct wl_pointer_listener pointer_listener = { pointer_handle_axis_source, pointer_handle_axis_stop, pointer_handle_axis_discrete, -#ifdef XWL_HAS_WL_POINTER_AXIS_V120 pointer_handle_axis_v120, -#endif }; static void @@ -1854,11 +1850,7 @@ static void create_input_device(struct xwl_screen *xwl_screen, uint32_t id, uint32_t version) { struct xwl_seat *xwl_seat; - int seat_version = 5; - -#ifdef XWL_HAS_WL_POINTER_AXIS_V120 - seat_version = 8; -#endif + int seat_version = 8; xwl_seat = calloc(1, sizeof *xwl_seat); if (xwl_seat == NULL) { diff --git a/include/meson.build b/include/meson.build index e953dfa65..f3e160ded 100644 --- a/include/meson.build +++ b/include/meson.build @@ -419,7 +419,6 @@ xwayland_data.set('XWL_HAS_GLAMOR', build_glamor and (gbm_dep.found() or build_e xwayland_data.set('XWL_HAS_EGLSTREAM', build_eglstream ? '1' : false) xwayland_data.set('XWL_HAS_LIBDECOR', have_libdecor ? '1' : false) xwayland_data.set('XWL_HAS_XWAYLAND_EXTENSION', xwaylandproto_dep.found() ? '1' : false) -xwayland_data.set('XWL_HAS_WL_POINTER_AXIS_V120', wayland_client_dep.found() and wayland_client_dep.version().version_compare('>= 1.21.0')) configure_file(output : 'xwayland-config.h', input : 'xwayland-config.h.meson.in', diff --git a/include/xwayland-config.h.meson.in b/include/xwayland-config.h.meson.in index 43b9ff29e..c254c1fd3 100644 --- a/include/xwayland-config.h.meson.in +++ b/include/xwayland-config.h.meson.in @@ -15,6 +15,3 @@ /* Build Xwayland with XWAYLAND extension */ #mesondefine XWL_HAS_XWAYLAND_EXTENSION - -/* libwayland has support for wl_pointer.axis_v120 events */ -#mesondefine XWL_HAS_WL_POINTER_AXIS_V120 diff --git a/meson.build b/meson.build index f9d798b7b..98fcb5992 100644 --- a/meson.build +++ b/meson.build @@ -215,9 +215,8 @@ if (host_machine.system() != 'darwin' and xwayland_path = join_paths(get_option('prefix'), get_option('bindir')) endif - wayland_client_dep = dependency('wayland-client', version: wayland_req, required: xwayland_required) xwayland_dep = [ - wayland_client_dep, + dependency('wayland-client', version: wayland_req, required: xwayland_required), dependency('wayland-protocols', version: wayland_protocols_req, required: xwayland_required), dependency('libxcvt', fallback: ['libxcvt', 'libxcvt_dep'], required: xwayland_required), ] @@ -234,8 +233,6 @@ if (host_machine.system() != 'darwin' and build_xwayland = false endif endforeach -else - wayland_client_dep = dependency('', required: false) endif build_xnest = false