Skip to content

Enable Windows precision touchpad pixel scrolling - #450

Merged
eval-exec merged 12 commits into
mainfrom
precision-touchpad-scroll
Oct 1, 2026
Merged

eval-exec merged 12 commits into
mainfrom
precision-touchpad-scroll

Conversation

@eval-exec

@eval-exec eval-exec commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Windows precision-touchpad panning now enters Neomacs as fractional pixel deltas through the DirectManipulation backend in the winit fork. Neomacs opts in and pins the exact native-tested revision on the fork's patch branch. Ordinary wheel events retain Lisp-owned detent speed and fallback when native setup, contact handling or rebasing fails. No dependency source is vendored.

Callbacks stay on the HWND thread. Updates use winit's existing wait timer only during gestures/reset; focus, resize, DPI changes and suspension cancel/rebase motion. Native inertia is disabled.

The native Linux/Windows/macOS GUI matrix now checks fractional input and a rich 100,000-line viewport with three installed font families, six face variants and 12,500 overlays. It verifies seven-pixel reversal, page navigation, the final viewport snapshot and colored readback. Timer callbacks explicitly select the displayed buffer; buffer-local metadata is captured before temporary file buffers, and snapshot positions account for Lisp's one-based indexing.

Validation: the fork's native Windows run passed all seven motion/COM lifecycle tests, and AppKit compilation passed: https://github.com/eval-exec/winit/actions/runs/36807720344 . Four X11 backend tests and six shared Neomacs input tests passed locally. The fresh binary and matching dump from this exact branch pass both Linux native display contracts. Both Windows/macOS native jobs pass, including a fresh release executable, matching dump and all three native GUI contracts: https://github.com/eval-exec/neomacs/actions/runs/36809262703 (commit 2f3f253). Real precision-touchpad gesture delivery and physical multi-monitor DPI transitions still need device validation.

Broader Linux stress validation passes 20 tests, with one rich-stream presentation-gap failure. Three interleaved pairs reproduce deadline misses on the accepted binary too; a 12,000-input candidate run confirms every input but still exceeds the 50ms gap gate. The failures remain under investigation. Five paired GUI instruction/cycle measurements are essentially unchanged, with fully running PMU counters, matching dumps and hardware Vulkan in all runs; no CPU speedup is claimed.

Relocated nextest archives also exposed a runtime-root lookup failure when the consumer checkout differs from the producer path. The resolver now validates nextest's remapped workspace after installed-tree lookup; a regression reproduced the failure before the fix, and it plus the existing package/image-layout contracts pass locally. Follow-up CI is pending.

Viewport-only diagnostics now use json-geometry, which borrows the authoritative protocol window geometry without serializing glyph matrices, off-screen coverage or font replay bytes. The former macOS rich-scroll JSON was 1.4 GB because it repeated in-memory font assets. The full json replay format remains available; the rich GUI test retains its pixel readback and final viewport checks and caps its geometry artifact at 64 KiB. Three snapshot API/serialization tests pass locally; a fresh exact Linux release executable and matching dump pass both native GUI contracts. The rich geometry JSON is 2,189 bytes (the prior full Linux snapshot was about 1.5 MB). Both follow-up Windows/macOS native jobs passed at cbf81ec: https://github.com/eval-exec/neomacs/actions/runs/36815836559. The branch is now rebased onto main 84b364a, preserving upstream structured composition tracing; redundant formatting-only commits were dropped. Workspace and fuzz formatting pass locally. All 181 focused display-query, fractional-input, runtime-relocation and snapshot contracts pass at b2467f7 after resolving the tracing-only rebase. A fresh b2467f7 Linux release executable and matching dump passed bootstrap, batch evaluation and both native GUI contracts (2/2). This is local Weston geometry correctness evidence. An isolated Ubuntu lane now runs the same native geometry/rich-scroll contracts, alongside Windows and macOS: https://github.com/eval-exec/neomacs/actions/runs/36821185380.

Merge-readiness triage: the latest completed broad Linux run reports the exact same 39 display failure IDs as current main 214e9ec. Both branches have 70 GUI failures, with several variable failure IDs; the new rich contract loses its Wayland connection before its scroll assertions, a symptom found in 31 other GUI logs. Its compositor failure is still being investigated; the draft remains open while the isolated Linux contract and current-head checks run. No failing tests or assertion gates were removed.

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 08b3d6e7-3b7d-469e-b537-e09540bcb0b9

📥 Commits

Reviewing files that changed from the base of the PR and between 84b364a and e53a00e.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • .github/workflows/native-display-contract.yml
  • Cargo.toml
  • crates/neomacs-display-runtime/src/window_identity.rs
  • crates/neomacs-gui-tests/fixtures/native-scroll-contract.el
  • crates/neomacs-gui-tests/tests/native_display.rs
  • crates/neomacs-perf/fixtures/scrolling-content.el
  • crates/neomacs/src/frame_layout.rs
  • crates/neomacs/src/tests/main_test.rs
  • crates/neovm-core/src/emacs_core/display/xdisp/mod.rs
  • crates/neovm-core/src/emacs_core/display/xdisp/tests/mod.rs
  • crates/neovm-core/src/emacs_core/lisp/load/mod.rs
  • crates/neovm-core/src/emacs_core/lisp/load/tests/mod.rs
 _________________________________________
< Time zones: the final boss of software. >
 -----------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@eval-exec
eval-exec force-pushed the precision-touchpad-scroll branch from cbf81ec to 2eeb2f8 Compare October 1, 2026 05:34
@eval-exec
eval-exec force-pushed the precision-touchpad-scroll branch from f32840b to b2467f7 Compare October 1, 2026 05:43
The resource integration tests are Windows registry and macOS defaults contracts. On Linux the binary has zero tests, so nextest exits with code 4 before input, geometry, build, and GUI validation can run. Select this step only on Windows and macOS; retain the remaining Linux checks.
@eval-exec
eval-exec marked this pull request as ready for review October 1, 2026 06:53
Copilot AI balanced review requested due to automatic review settings October 1, 2026 06:53
@eval-exec
eval-exec merged commit 8128386 into main Oct 1, 2026
35 of 40 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

It bumps an unverifiable forked winit revision whose native touchpad behavior cannot be confirmed here, and the PR itself notes pending device validation and unresolved CI failures, warranting human review.

Review effort: Balanced
Findings: None

What changed in this PR

This PR enables Windows precision-touchpad pixel scrolling by bumping the forked winit revision and opting in via with_precision_touchpad(true). Alongside the feature, it adds a cross-platform (Linux/macOS/Windows) native "rich scroll" GUI contract test, introduces a lightweight json-geometry frame-snapshot format to avoid serializing huge in-memory font assets, and hardens runtime-root resolution for relocated nextest archives by falling back to NEXTEST_WORKSPACE_ROOT.

Changes:

  • Opt into Windows precision-touchpad panning and pin the native-tested winit fork revision (2290f91…).
  • Add a JsonGeometry snapshot format (geometry/window-info only) and a native rich-viewport scroll contract fixture + test, extended to a Linux CI lane.
  • Add a runtime-root resolver fallback (runtime_project_root_from_paths) so archived tests locate the consumer's remapped checkout after checking the executable's installed tree.
File Description
crates/​neomacs-display-runtime/​src/​window_identity.rs Enables precision touchpad on the Windows window attributes.
Cargo.toml /​ Cargo.lock Pins the new winit fork revision; lockfile adds windows/windows-core 0.62.2 to winit-win32.
crates/​neovm-core/​.../​load/​mod.rs Extracts runtime_project_root_from_paths with a NEXTEST_WORKSPACE_ROOT fallback after exe-tree lookup.
crates/​neovm-core/​.../​load/​tests/​mod.rs Regression test proving archived binaries resolve the remapped tree without overriding an installed tree.
crates/​neovm-core/​.../​xdisp/​mod.rs Adds the JsonGeometry format, parsing, and updated docs/error message.
crates/​neovm-core/​.../​xdisp/​tests/​mod.rs Asserts the new format is forwarded to the frontend hook.
crates/​neomacs/​src/​frame_layout.rs Implements geometry-only serialization borrowing authoritative window data.
crates/​neomacs/​src/​tests/​main_test.rs End-to-end check that geometry output matches full JSON geometry and omits bulky fields.
crates/​neomacs-perf/​fixtures/​scrolling-content.el Adds Windows/macOS font families so ≥3 families resolve on more runners.
crates/​neomacs-gui-tests/​tests/​native_display.rs New rich-scroll contract test + readback env wiring.
crates/​neomacs-gui-tests/​fixtures/​native-scroll-contract.el New timer-driven pixel/page scroll contract fixture.
.github/​workflows/​native-display-contract.yml Adds a Linux lane, PR triggers, scroll-input isolation step, and a non-Linux guard for the resource adapters step.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants