Skip to content

21.1.16.1-fork.1 — Relative Mouse Mode & Cursor Confinement (Unofficial)

Choose a tag to compare

@vivimillin vivimillin released this 11 Jul 08:13

WSL2 users: get 21.1.16.1-fork.2 instead — it includes everything in this build plus the zero-config WSL2 vsock transport (Issue #80). This build remains for testing the mouse patch in isolation.

This is an unofficial release based on marchaesen/vcxsrv 21.1.16.1.

What's New

Problem Before After
No relative displacement data XI_RawMotion events never generated Hardware-level relative deltas fed via WM_INPUTwinEnqueueRawMotion()
Cursor not confined on grab XGrabPointer with confine_to had no effect ClipCursor() applied with 1px padding on grab, released on ungrab
Cursor not hidden on grab XFixesHideCursor had no effect ShowCursor(FALSE) loop on grab, restored on ungrab

SDL2 applications no longer need the SDL_MOUSE_RELATIVE_MODE_WARP=1 workaround.
These are DDX-layer improvements for standard X11 features. They benefit any XInput2 or XGrabPointer client — most commonly SDL2 games and 3D/CAD tools running via WSL, but applicable to any X11 app on VcXsrv.

Tested With

Application Platform Mode Result
dosbox-staging 0.82 WSL1/WSL2 seamless + capture Pass
AssaultCube 1.3 WSL1/WSL2 capture + release Pass
crispy-doom 5.11 WSL1/WSL2 capture + release Pass

Usage

No extra setup required beyond upstream VcXsrv. After install just run:

vcxsrv.exe -multiwindow -clipboard -wgl

For dosbox-staging on WSL: if the cursor stays still in seamless mode, set export XDG_CURRENT_DESKTOP=WSL before launching — SDL2 uses this to decide whether to enable X11 mouse integration.

Upstream

All credit for the base X server goes to marchaesen/vcxsrv. If this patch helps you, the most useful thing you can do — more than starring the fork — is test PR #78 and leave your results there; confirmed user reports are what moves the review forward.