feat(input): daemon sets up the host->guest input-linux bridge via QMP

The uinput devices the input adapter creates were never forwarded into the
guest: the input-linux bridge was external (manual monitor object_add), so it
was lost on every reconfigure and whenever the kernel-assigned device numbers
changed. Make the vmhost seam -- which already owns the VM's single QMP
connection -- add the input-linux objects itself on reaching READY (A=keyboard
+abs with grab_all, B=mouse) and object_del them on teardown. The input adapter
publishes the uinput evdev paths into a per-endpoint home; discovery attaches
input before vmhost so the paths are ready. No second QMP socket or connection.

Also move the mouse buttons (incl. middle) and the wheel onto device B, so B is
a complete relative mouse and A is keyboard+abs only.

Bump 0.3.8.
This commit is contained in:
2026-06-24 16:31:23 +03:00
parent 929bcf0e74
commit d6c45ddb04
13 changed files with 436 additions and 55 deletions
+8 -1
View File
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.16)
# Single source of truth for the version: CI passes -DVMSIG_VERSION=${TAG#v}, so the project
# version (-> libvgpu-perception SONAME/.so version) and the .deb version come from one tag.
set(VMSIG_VERSION "0.3.7" CACHE STRING "Release version (MAJOR.MINOR.PATCH); CI passes the tag")
set(VMSIG_VERSION "0.3.8" CACHE STRING "Release version (MAJOR.MINOR.PATCH); CI passes the tag")
project(vmsig VERSION ${VMSIG_VERSION} LANGUAGES C)
set(CMAKE_C_STANDARD 17)
@@ -269,6 +269,13 @@ target_link_libraries(vmsig_inputobstest PRIVATE vmsig Threads::Threads)
target_compile_options(vmsig_inputobstest PRIVATE -Wall -Wextra)
add_test(NAME inputobs COMMAND vmsig_inputobstest)
add_executable(vmsig_uinputlayouttest src/test/test_uinputlayout.c)
target_link_libraries(vmsig_uinputlayouttest PRIVATE vmsig)
target_include_directories(vmsig_uinputlayouttest PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src/si/input/include)
target_compile_options(vmsig_uinputlayouttest PRIVATE -Wall -Wextra)
add_test(NAME uinputlayout COMMAND vmsig_uinputlayouttest)
add_executable(vmsig_memwritetest src/test/test_memwrite.c)
target_link_libraries(vmsig_memwritetest PRIVATE vmsig Threads::Threads)
target_include_directories(vmsig_memwritetest PRIVATE