Skip to content

test(desktop-linux): allow x11vnc's one early cursor shape in the viewer cursor test - #488

Merged
ElbertePlinio merged 2 commits into
mainfrom
fix/481-viewer-cursor-shape
Oct 30, 2026
Merged

ElbertePlinio merged 2 commits into
mainfrom
fix/481-viewer-cursor-shape

Conversation

@ElbertePlinio

@ElbertePlinio ElbertePlinio commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

The viewer cursor test expected no cursor shape update at all. Under load it once received one.

x11vnc applies -nocursorshape by polling. libvncserver turns on cursor shape updates when it reads the client's SetEncodings, and x11vnc turns them off on its next main loop pass (screen.c in x11vnc 0.9.17). The first framebuffer update can therefore carry one shape. The test now allows at most one shape before the first pointer move. It still requires no shape after that, and the pixel checks are unchanged, so the pointer must still be painted into the pixels.

Closes #481

No device pass: this changes one test assertion and no product behavior.

Requirement Verification Scenario and edge cases Result Evidence
Find when the server sends a shape under load Probe that counts shapes per update; x11vnc source read 15 loaded runs and idle runs Shapes arrive only in the first update, at most one probe-load-*.log, probe-idle*.log
Confirm the failure on main File run 100 times Loaded host 2 of 100 failed with cursorShapes 1 before-fail-4.log, before-fail-69.log, before.log
Make the assertion hold and state the timing New assertion and comment 100 runs, then 20 more after rebase on main 120 of 120 passed; the zero-shape check after the first pointer move is unchanged after.log, after-rebase.log
Lint, typecheck, PickCheck, secrets oxlint, tsc --noEmit, PickCheck, gitleaks Repo and branch range Clean lint-480-481.log

A real viewer can get the same early shape. That is outside this test fix and is tracked in #486.

Evidence paths are under ~/.pickforge/investigations/481/ on the author's machine.

Review:

Round Revision GPT-6.1 Sol
1 834c722 9/10, no findings

…wer cursor test

x11vnc applies -nocursorshape by polling. libvncserver enables cursor shape
updates when it reads SetEncodings, and x11vnc clears them on its next main
loop pass. The first framebuffer update can therefore carry one shape. Allow
at most one shape before the first pointer move, and still require none
after the pointer is painted into the pixels.

Closes #481
@ElbertePlinio
ElbertePlinio merged commit a8f14b6 into main Oct 30, 2026
10 checks passed
@ElbertePlinio
ElbertePlinio deleted the fix/481-viewer-cursor-shape branch October 30, 2026 16:37
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.

test(desktop-linux): viewer-cursor test saw a cursor shape update under load

1 participant