wayland_common: warn if scrolling will be broken

Since the scroll event handler is moved to wl_pointer_frame, version 5 of
wl_seat is required. Warn that scrolling is broken if the compositor
doesn't support that verison.
This commit is contained in:
nanahi 2024-02-02 00:27:51 -05:00 committed by Dudemanguy
parent e0f9cf61b9
commit 27cb193f0e
1 changed files with 3 additions and 0 deletions

View File

@ -1420,6 +1420,9 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id
}
if (!strcmp(interface, wl_seat_interface.name) && found++) {
if (ver < 5)
MP_WARN(wl, "Scrolling won't work because the compositor doesn't "
"support version 5 of wl_seat protocol!\n");
#ifdef HAVE_WAYLAND_1_21
ver = MPMIN(ver, 8); /* Cap at 8 in case new events are added later. */
#else