mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 15:13:13 -04:00
Change set_cursor_position to return Result<(), String> (#562)
* Change set_cursor_position to return Result<(), String> This is now consistent with `grab_cursor`, and enables `window.set_cursor_position(x, y)?` in functions that return `Result<_, Box<Error>>`. * Adjust error handling of unimplemented cusor opertions in wayland * The final nitpick * Actually one more
This commit is contained in:
committed by
Francesca Frangipane
parent
fb7528c239
commit
8f394f117b
@@ -559,8 +559,8 @@ impl Window {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_cursor_position(&self, _position: LogicalPosition) -> Result<(), ()> {
|
||||
Err(())
|
||||
pub fn set_cursor_position(&self, _position: LogicalPosition) -> Result<(), String> {
|
||||
Err("Setting cursor position is not possible on Emscripten.".to_owned())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user