CNA-PLAT-013: Wayland gives no desktop pointer position, and browsers hide gamepads until a button press and gate pointer lock on a user gesture

CNA snapshot c1c316b9  ·  Known Issues › Platform limitations  ·  source links pinned to c1c316b9

✓

Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit c1c316b9; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.

Under SDL3's Wayland video driver the desktop pointer position reads (0, 0) and the cursor cannot be warped reliably; on the web a gamepad appears only after the player presses a button on it, and relative mouse mode engages only after a click.

Identifier
CNA-PLAT-013
Category
Platform limitation
Subsystem
Platforms
Status
Open
Verified against
CNA c1c316b9 (c1c316b9c7a846ce8002809c151fcd1af14942c9)
Evidence basis
Source-verified: read at TARGET, not executed
Tests touching this area
Yes: see Current tests
Affected contract
Mouse::GetGlobalPositionEXT / WarpGlobalEXT on a Wayland session (SDL3's wayland video driver); GamePad connection and Mouse relative mode in Emscripten builds

Expected behaviour

Desktop-style pointer queries and immediate gamepad detection.

Actual behaviour at TARGET

platform-input-notes.md records, as verified in CNA's own input work (task 783), that under Wayland SDL_GetGlobalMouseState silently returns (0, 0) whatever the real cursor does, because the compositor does not give clients desktop coordinates, and that the operating-system cursor cannot be warped reliably. Sdl3Mouse passes those answers through: TryGetGlobalPosition reports success with SDL's values, and SetGlobalPosition returns SDL_WarpMouseGlobal's result. Window-local Mouse::SetPosition keeps XNA's contract through a virtual anchor. The same document records that the browser Gamepad API shows controllers only “until the user presses a button” and that pointer lock “requires a user gesture” and can be exited by the browser.

Source locations

Evidence

Checked by reading at c1c316b9; not executed. The Wayland behaviour is CNA's own recorded observation (task 783), not repeated here.

Focused reproduction

No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.

Current tests

None for the host behaviour itself.

Regression test

None; these are host policies.

Blast radius

Games on a Wayland session that read or warp the desktop pointer; games shipped to browsers.

Workaround

On Wayland, run the game under XWayland (SDL_VIDEODRIVER=x11) when global pointer access is required; on the web prompt for a click before enabling relative mode and before expecting gamepads.

The same subject is explained at several altitudes. These are the neighbouring pages at each one.