From b558beeea3c33ca62745892af53babc6b14c2036 Mon Sep 17 00:00:00 2001 From: alexei-zebra Date: Sat, 10 Oct 2026 14:15:40 +0300 Subject: [PATCH] Fix the build with the wayland 1.20 headers axis_value120 (wl_pointer version 8) and axis_relative_direction (version 9) do not exist in the headers older distributions ship, which broke the build on ubuntu 22.04. They are not needed anyway: a pointer inherits the version of its seat, which is bound at version 7 here, so the compositor cannot send those events at all. The version cap now documents that the listener covers it and that raising it requires handling the newer events too. --- src/window/wayland/WaylandListeners.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/window/wayland/WaylandListeners.cpp b/src/window/wayland/WaylandListeners.cpp index 10e4ed0e3..c30a9e0a2 100644 --- a/src/window/wayland/WaylandListeners.cpp +++ b/src/window/wayland/WaylandListeners.cpp @@ -172,8 +172,6 @@ static void seat_capabilities(void*, wl_seat* seat, uint32_t capabilities) { listener.axis_source = ignore_event<>; listener.axis_stop = ignore_event<>; listener.axis_discrete = ignore_event<>; - listener.axis_value120 = ignore_event<>; - listener.axis_relative_direction = ignore_event<>; return listener; }(); @@ -303,6 +301,10 @@ void registry_global( }(); xdg_wm_base_add_listener(state.wmBase, &listener, nullptr); } else if (strcmp(interface, wl_seat_interface.name) == 0) { + // A pointer inherits the seat version, so the pointer listener only + // has to cover the events of version 7 and below. Version 8 adds + // axis_value120 and version 9 axis_relative_direction, whose members + // do not exist in the wayland 1.20 headers either. state.seat = static_cast(wl_registry_bind( registry, name, &wl_seat_interface, std::min(version, 7u) ));