Skip to content

Commit

Permalink
Update documentation regarding set_cursor_position (#3521)
Browse files Browse the repository at this point in the history
  • Loading branch information
Friz64 authored and kchibisov committed Feb 26, 2024
1 parent bbd9368 commit 056953d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1363,15 +1363,16 @@ impl Window {
///
/// ## Platform-specific
///
/// - **iOS / Android / Web / Wayland / Orbital:** Always returns an [`ExternalError::NotSupported`].
/// - **Wayland**: Cursor must be in [`CursorGrabMode::Locked`].
/// - **iOS / Android / Web / Orbital:** Always returns an [`ExternalError::NotSupported`].
#[inline]
pub fn set_cursor_position<P: Into<Position>>(&self, position: P) -> Result<(), ExternalError> {
let position = position.into();
self.window
.maybe_wait_on_main(|w| w.set_cursor_position(position))
}

/// Set grabbing [mode]([`CursorGrabMode`]) on the cursor preventing it from leaving the window.
/// Set grabbing [mode](CursorGrabMode) on the cursor preventing it from leaving the window.
///
/// # Example
///
Expand Down

0 comments on commit 056953d

Please sign in to comment.