CmdWindowCursor
Configures the window mouse cursor (not to be confused with generic pointer events).
Groups:
- cursor visibility
- grab/lock mode
- cursor icon
Platform Notes
- Desktop: native support for
none,confined, andlocked. - WASM: partial support:
mode=locked: requests Pointer Lock API;mode=confined: logical polyfill with relative movement and no delta clamping;mode=none: exits capture/lock.visibleandiconremain unsupported.
Arguments
| Field | Type | Description |
|---|---|---|
| windowId | u32 | Window ID |
| visible | Option |
Show/hide cursor (optional) |
| mode | Option |
Grab mode (optional): none, confined, locked |
| icon | Option |
Cursor icon (optional) |
CursorIcon (Enum)
defaultcontext-menuhelppointerprogresswaitcellcrosshairtextvertical-textaliascopymoveno-dropnot-allowedgrabgrabbinge-resizen-resizene-resizenw-resizes-resizese-resizesw-resizew-resizeew-resizens-resizenesw-resizenwse-resizecol-resizerow-resizeall-scrollzoom-inzoom-out
Response
Returns CmdResultWindowCursor:
| Field | Type | Description |
|---|---|---|
| success | bool | Whether command was applied successfully |
| message | String | Status or error |
Notes
- All fields are optional: send only the subset you want to update.
- When
iconis sent by host command, the icon becomes a persistent window override and has priority over cursor updates from the UI pipeline. - Capture changes emit
WindowEvent::OnPointerCaptureChange. - In browsers,
Escapemay release pointer lock due to platform policy; the core reports this change via capture event.
Documentation Vulfram Core