Implement set_cursor_position() on X11

This commit is contained in:
Pierre Krieger 2015-04-07 21:54:53 +02:00
parent 68856c3add
commit 5a31b2e438
2 changed files with 10 additions and 2 deletions

View file

@ -825,7 +825,11 @@ impl Window {
1.0
}
pub fn set_cursor_position(&self, _x: i32, _y: i32) -> Result<(), ()> {
unimplemented!();
pub fn set_cursor_position(&self, x: i32, y: i32) -> Result<(), ()> {
unsafe {
ffi::XWarpPointer(self.x.display, 0, self.x.window, 0, 0, 0, 0, x, y);
}
Ok(())
}
}