Skip to content

fix(input): target configured mouse viewport - #145

Open
ReenigneArcher wants to merge 2 commits into
masterfrom
fix/mouse-input-clamping
Open

ReenigneArcher wants to merge 2 commits into
masterfrom
fix/mouse-input-clamping

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

Replace macOS main-display hardcoding with caller-provided virtual desktop and target viewport geometry. Apply the same mapping contract to Windows and Linux/FreeBSD, including negative origins and the XTest fallback.

Expose exception-safe runtime diagnostics for host log integration, document consumer setup, and add runtime and backend tests.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Replace macOS main-display hardcoding with caller-provided virtual desktop and target viewport geometry. Apply the same mapping contract to Windows and Linux/FreeBSD, including negative origins and the XTest fallback.

Expose exception-safe runtime diagnostics for host log integration, document consumer setup, and add runtime and backend tests.
@ReenigneArcher
ReenigneArcher force-pushed the fix/mouse-input-clamping branch from a1896b2 to 4fd0c7a Compare September 16, 2026 20:58
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.12440% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.20%. Comparing base (28c0c46) to head (36a1976).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/uhid_backend.cpp 83.60% 3 Missing and 7 partials ⚠️
src/platform/windows/windows_backend.cpp 73.52% 7 Missing and 2 partials ⚠️
src/platform/macos/macos_backend.cpp 61.11% 4 Missing and 3 partials ⚠️
src/core/runtime.cpp 96.70% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #145      +/-   ##
==========================================
+ Coverage   73.93%   74.20%   +0.27%     
==========================================
  Files          40       40              
  Lines       10085    10236     +151     
  Branches     3536     3608      +72     
==========================================
+ Hits         7456     7596     +140     
- Misses       1976     2302     +326     
+ Partials      653      338     -315     
Flag Coverage Δ
FreeBSD 52.12% <37.14%> (-0.37%) ⬇️
Linux-Clang 55.53% <64.28%> (+0.15%) ⬆️
Linux-GCC 66.45% <83.87%> (+0.31%) ⬆️
PowerShell 75.60% <ø> (ø)
Windows-MSVC 88.61% <94.73%> (+0.08%) ⬆️
Windows-MinGW-UCRT64 63.92% <83.17%> (+0.31%) ⬆️
macOS 49.33% <59.18%> (+0.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/include/libvirtualhid/types.hpp 97.41% <100.00%> (ø)
src/core/runtime.cpp 84.80% <96.70%> (+1.25%) ⬆️
src/platform/macos/macos_backend.cpp 42.30% <61.11%> (+1.07%) ⬆️
src/platform/windows/windows_backend.cpp 83.54% <73.52%> (-0.17%) ⬇️
src/platform/linux/uhid_backend.cpp 81.50% <83.60%> (+0.02%) ⬆️

... and 10 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28c0c46...36a1976. Read the comment docs.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant