SDL
SDL copied to clipboard
wayland: High resolution scroll wheel support
Updates the Wayland core protocol spec file and adds support for the new axis_value120 event to support high resolution scroll wheels. This new event replaces axis_discrete in version 8 of the protocol and higher and delivers values in increments of 1/120 of a logical scroll step. Unlike axis_discrete, axis_value120 makes no guarantees about only delivering one event per-axis per-frame, so values are accumulated and committed during the frame event.
A minor include header order change was needed as well, as the libdecor headers were pulling in the older, system provided Wayland core protocol header file instead of the newer, locally generated one.
Marked as draft for now, as this protocol is quite new and this needs testing.
Self-assigning, but I don't have hardware for this so I won't be able to test locally. (Not that I have a Deck yet but I wonder if the touchpads could interact with this?)
Removing the draft status as I've tested this as much as I can and, after a quick fix, it seems to work with no regressions. I don't think this needs anything else code-wise, it's just a question of whether or not to wait for more compositor support before merging.
I've put this in the 2.26 milestone; if we're generally comfortable with this patch but want more testing, we should probably merge it while we have a few months for it to marinate.
I'm getting a bunch of compile errors now, I assume this caused it.
libtool: compile: gcc -g -O2 "-ffile-prefix-map=/<<PKGBUILDDIR>>=." -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DUSING_GENERATED_CONFIG_H -Iinclude "-I/<<PKGBUILDDIR>>/include" -idirafter "/<<PKGBUILDDIR>>/src/video/khronos" -DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=25 -DSDL_BUILD_MICRO_VERSION=0 -mmmx -m3dnow -msse -msse2 -msse3 -Wall -fno-strict-aliasing -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-statement -D_REENTRANT -I/usr/include/libdrm -Igen -I/usr/include/libdecor-0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -pthread -I/usr/include/ibus-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -D_REENTRANT -DHAVE_LINUX_VERSION_H -c "/<<PKGBUILDDIR>>/src/video/wayland/SDL_waylanddyn.c" -fPIC -DPIC -o build/.libs/SDL_waylanddyn.o
/<<PKGBUILDDIR>>/src/video/wayland/SDL_waylandsym.h: In function ‘SDL_WAYLAND_LoadSymbols’:
/<<PKGBUILDDIR>>/src/video/wayland/SDL_waylandsym.h:106:41: error: ‘wl_egl_window_create’ undeclared (first use in this function); did you mean ‘wl_egl_window’?
106 | SDL_WAYLAND_SYM(struct wl_egl_window *, wl_egl_window_create, (struct wl_surface *, int, int))
| ^~~~~~~~~~~~~~~~~~~~
/<<PKGBUILDDIR>>/src/video/wayland/SDL_waylanddyn.c:164:54: note: in definition of macro ‘SDL_WAYLAND_SYM’
164 | #define SDL_WAYLAND_SYM(rc,fn,params) WAYLAND_##fn = fn;
| ^~
https://launchpadlibrarian.net/619583824/buildlog_ubuntu-kinetic-amd64.libsdl2_2.25.0+git2208212349.b204db1e6~k~wayland8_BUILDING.txt.gz