CursorGrabMode

None

Confined

Locked

Description

Defines if and how the cursor is grabbed by a [Window].

Platform-specific

  • Windows doesn't support [CursorGrabMode::Locked]
  • macOS doesn't support [CursorGrabMode::Confined]
  • iOS/Android don't have cursors.

Since Windows and macOS have different [CursorGrabMode] support, we first try to set the grab mode that was asked for. If it doesn't work then use the alternate grab mode.

Functions