mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 21:00:04 -04:00
Fix Window platform support documentation
This resolves various problems with the documentation about platform support on the Window struct. It also completely removes pointless runtime errors in favor of consistent no-ops on all platforms that do not support a certain features.
This commit is contained in:
@@ -171,14 +171,12 @@ impl Window {
|
||||
|
||||
#[inline]
|
||||
pub fn set_cursor_position(&self, _position: Position) -> Result<(), ExternalError> {
|
||||
// Intentionally a no-op, as the web does not support setting cursor positions
|
||||
Ok(())
|
||||
Err(ExternalError::NotSupported(NotSupportedError::new()))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_cursor_grab(&self, _grab: bool) -> Result<(), ExternalError> {
|
||||
// Intentionally a no-op, as the web does not (properly) support grabbing the cursor
|
||||
Ok(())
|
||||
Err(ExternalError::NotSupported(NotSupportedError::new()))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user