Skip to content

fix(core): stale per-session state, owed nudges, DWM centring failure spin, input ordering (#386) - #389

Open
Maxaubert wants to merge 5 commits into
refactor/384-remove-legacy-transform-cursorfrom
fix/386-core-input-fixes
Open

Maxaubert wants to merge 5 commits into
refactor/384-remove-legacy-transform-cursorfrom
fix/386-core-input-fixes

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Closes #386. Stacked on #388 (merge that first). Verified-real findings from the 2026-10-08 review: DWM centring failure latched (no forced write + log every tick); view owner, spring and pan keys reset at zoom-in; ixPubLevel_ reset at zoom-out; a nudge skipped during a click is owed and delivered after the click window; atomic click stamp; hide->show restores with the repaint nudge; cursorHiddenByUs mirrors the model; lockEff/lockFreed cleared outside free zoomed ticks; raw UP safety net ordered by event time instead of a 30 ms wall-clock guess; Java fallback rects DPI-scaled; Java bridge probes and MSAA stalls back off; C4701 fixed. Refuted findings skipped.

Verified on this PC with all four PRs combined (signed UIAccess deploy): unit suite passes; frame-capture harness: held-button shake 0 jumps (27 writes / 564 moves), free and forced-lock pointer 0 px spread at ~6x; unreadable-ini test passes; tray layout key mid-zoom keeps the zoom; Inspect enters and exits cleanly (the crosshair is capture-excluded, so it was not seen by the capture). Not tested: mouselook in a real game (pointer hidden), which keeps the weld path.

🤖 Generated with Claude Code

https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu

Maxaubert and others added 5 commits October 8, 2026 15:12
…session state

- DWM centring: a missing or refusing export latches once; present() no longer retries the
  switch (forced write plus an Info line) on every tick (WantDwmCentreSwitch).
- Pointer nudge: a nudge skipped for a click is owed and delivered on the first tick after the
  click window (present and idleTick); never during it. g_lastButtonMs is atomic and forward-only
  (WithinClickWindow), shared with the cursor blanker's worker.
- Native hide->show transition nudges after the blanker restore, like the zoom-out.
- ixPubLevel_ is reset at session end (the context outlives the session), so a quick zoom back
  to the same level still nudges after the publish.
- View owner, latched caret target, detached view, spring velocity and pan keys reset at zoom-in.
- t.lockEff/lockFreed cleared outside a free zoomed tick, so panArmed never reads a stale value.
- cursorHiddenByUs mirrors TransformModel::pointerHidden() after each present (stale after Inspect
  exit and the native hide hotkey before).
- C4701 zp0 initialised.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu
…lock

The 30 ms guard let a stale raw UP cancel a live hold once the main thread stalled longer than
that. rawKeyUp/rawButtonUp now take the WM_INPUT event time (GetMessageTime) and skip the clear
only when the hook recorded a DOWN strictly after it (hook .time, wrap-safe, RawUpIsStale).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu
…s and MSAA stalls

- The Java character-bounds fallbacks are converted by the monitor scale like getCaretLocation.
- A failed bridge probe backs off per process (checked before OpenProcess); the retry after a
  failed read backs off 250 ms to 4 s instead of polling every 250 ms.
- MsaaCaret skips hung windows and sits out 2 s after a call over 250 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu
…stops flipping the view

A level write still goes out while a button is held, but its nudge was skipped for the whole hold,
so zooming during a drag-select alternated the view between Wind's centre and DWM's every frame
(about 90 px, field video 2026-10-08). A press held for the full 250 ms click window is a drag and
is nudged as usual; short clicks and the window after a release stay protected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu
…cus or keyboard view

Following a caret with DWM centring off, the 12 Hz 1 px warm pulse showed as a one-pixel shake of
the whole view (field video 2026-10-08). The pulse exists to wake DWM in games; a free pointer's
detached view is a desktop app. Pulses stay on for locked mouselook and Inspect, and an open pulse
still closes when the owner changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu
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