Conversation
kwhat
force-pushed
the
1.3
branch
9 times, most recently
from
April 20, 2024 04:55
99a6851 to
0e34a45
Compare
kwhat
force-pushed
the
1.3
branch
3 times, most recently
from
May 7, 2024 14:34
7d51994 to
90c2248
Compare
kwhat
force-pushed
the
evdev
branch
4 times, most recently
from
July 19, 2026 03:51
b8312e5 to
13a5c91
Compare
Replace one-shot glob enumeration with a libudev enumerate + netlink monitor so devices are hooked and released as they are plugged in and out. Classify devices from udev ID_INPUT_* properties, and skip our own uinput clones so grabbing a clone cannot cascade into an infinite loop. Add eventfd-based hook_stop() to break the epoll loop cleanly, and move pointer position into self-tracking (track_pointer_delta) so mouse_move no longer needs X11 for every relative event. Restructure the event handling: hook_event_proc becomes a flat EV_* type router delegating to hook_key_proc / hook_rel_proc / hook_sync_proc, the per-device drain and cleanup move into hook_device_proc and an idempotent hook_teardown, and every dispatch_* function now takes the raw input_event and derives its own timestamp, keycode and keysym for a consistent layer.
Make X11 a runtime (dlopen) dependency instead of a link-time one, and add Wayland-native paths wherever a protocol exists, so libuiohook.so builds and starts with no X11/Wayland NEEDED entries and works on pure Wayland, X11, or a bare console. - x11_helper: dlopens libX11 / libX11-xcb / libxkbcommon-x11 / libXinerama into a resolved function-pointer struct owning one shared Display. - wayland_helper: dlopens libwayland-client (functions via dlsym, the wl_*_interface data symbols compiled in from wayland-scanner output for core, xdg-output, xdg-shell and the vendored wlr-layer-shell protocol). - Keymap now comes from wl_keyboard.keymap (Wayland) then xkb_x11 (X) then a default layout; key repeat from wl_keyboard.repeat_info; keysym->keycode is pure libxkbcommon; screen layout from xdg-output; and the pointer position seed from a transparent zwlr_layer_shell_v1 overlay probe. Every path is Wayland-first (XWayland reports the wrong view), falling back to X, then a default. - hook_post_event reimplemented on a lazily created uinput device (no X). - Drop the libXt dependency (multi-click time via XGetDefault + default). - Normalize reinjected REL motion by the device MOUSE_DPI so a grabbed high-DPI mouse does not feel over-accelerated under Wayland; the uinput clone carries no MOUSE_DPI for libinput to normalize.
Align the CI workflow and README with the backend's actual dependencies: add libevdev, libudev, libwayland (+ wayland-scanner) and wayland-protocols, and drop the no-longer-used libXtst, libXt and libxkbfile. In the cross jobs the wayland-scanner build tool and wayland-protocols data are host / arch-independent, so they install without a target arch suffix. Also drop the removed USE_XT option from the README configuration table.
- wayland_helper: replace memfd_create with POSIX shm_open so the file no longer depends on _GNU_SOURCE; link librt for shm_open on older glibc. - dispatch_event: make dispatch_event() static; fix mouse wheel rotation to delta * rotation; gate the synthesized CLICKED event on the release consume flag to match the other backends; take the resolved uiohook button as a parameter instead of translating and returning a mask out-param. - input_hook: map BTN_* to button + mask inline in hook_key_proc (matching the Windows/Darwin backends); fix the horizontal wheel dispatching the vertical delta; accumulate the consumed flag across the motion/wheel flushes. - input_helper: guard keycode_to_utf8 against multi-codepoint overrun and guard the per-event paths against a NULL xkb state; drop the X11 pointer-map lookup (button_map_lookup) and its button table -- raw evdev buttons are not remapped through the X server. - system_properties: fix the multi-click sscanf check (== 1, not != EOF); remove the dead XRandR settings thread and the broken XF86Misc fallback; resolve the X display via x11_display() instead of a cached static. - x11_helper: drop the now-unused XGetPointerMapping binding. - CMakeLists: drop the USE_XF86MISC/USE_XRANDR/USE_XINERAMA options (Xinerama is loaded at runtime unconditionally) and require the Xinerama headers alongside the other X11 headers. Add FIXME.md tracking the deferred evdev motion/wheel consumption fix.
- dispatch_event: clamp the scaled wheel rotation to the int16_t field, pinning to INT16_MAX/INT16_MIN with an overflow/underflow warning instead of wrapping. - wayland_helper: null-check wl_registry_bind for the seat/output globals; check wl_display_roundtrip returns in the enumeration and keymap paths; serialize the one-time dlopen + symbol resolution with a mutex; replace the WL_LOAD macro with a wl_resolve() function driven by a symbol table; clamp the probed pointer position to the int16_t coordinate range with a warning rather than wrapping. - x11_helper: drop the unused xkb_x11_state_new_from_device binding (X11_CAP_XKB no longer requires it); replace the RESOLVE macro with an x11_resolve() function.
The public uiohook_event.reserved field was removed in 1.3; consumption is now signalled via MASK_CONSUMED in the event mask (matching the x11/windows/ darwin backends). Drop the reserved writes and read consumption from uio_event.mask & MASK_CONSUMED so the evdev backend builds against 1.3.
linux-arm was the only cross job enabling ubuntu-toolchain-r/test. It upgrades libgcc-s1:amd64 ahead of the armhf ports version, and libgcc-s1 must be the same version across architectures, so libc6:armhf / libffi8:armhf could not resolve (held broken packages). The distro gcc-arm-linux-gnueabihf provides the cross compiler, so the PPA is not needed here; disabling it matches the other cross jobs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.