Skip to content

Commit fa9e303

Browse files
authored
Doc for X11 CursorGrabMode support (#19811)
# Objective - Clarify that `CursorGrabMode::Locked` isn't supported on X11 Source: https://docs.rs/winit/latest/winit/window/enum.CursorGrabMode.html#variant.Locked ## Solution - Add it to the platform-specific docs
1 parent 37bbbf7 commit fa9e303

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/bevy_window/src/window.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,10 @@ pub struct CursorOptions {
750750
/// ## Platform-specific
751751
///
752752
/// - **`macOS`** doesn't support [`CursorGrabMode::Confined`]
753+
/// - **`X11`** doesn't support [`CursorGrabMode::Locked`]
753754
/// - **`iOS/Android`** don't have cursors.
754755
///
755-
/// Since `macOS` doesn't have full [`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.
756+
/// Since `macOS` and `X11` don't have full [`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.
756757
pub grab_mode: CursorGrabMode,
757758

758759
/// Set whether or not mouse events within *this* window are captured or fall through to the Window below.
@@ -1062,9 +1063,10 @@ impl From<DVec2> for WindowResolution {
10621063
/// ## Platform-specific
10631064
///
10641065
/// - **`macOS`** doesn't support [`CursorGrabMode::Confined`]
1066+
/// - **`X11`** doesn't support [`CursorGrabMode::Locked`]
10651067
/// - **`iOS/Android`** don't have cursors.
10661068
///
1067-
/// Since `macOS` doesn't have full [`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.
1069+
/// Since `macOS` and `X11` don't have full [`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.
10681070
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
10691071
#[cfg_attr(
10701072
feature = "bevy_reflect",

0 commit comments

Comments
 (0)