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:
aloucks 2018-06-19 10:30:15 -04:00 committed by Francesca Frangipane
parent fb7528c239
commit 8f394f117b
10 changed files with 40 additions and 31 deletions

View file

@ -322,7 +322,7 @@ impl Window {
/// Changes the position of the cursor in window coordinates.
#[inline]
pub fn set_cursor_position(&self, position: LogicalPosition) -> Result<(), ()> {
pub fn set_cursor_position(&self, position: LogicalPosition) -> Result<(), String> {
self.window.set_cursor_position(position)
}