Implement set_cursor_position() on X11
This commit is contained in:
parent
68856c3add
commit
5a31b2e438
2 changed files with 10 additions and 2 deletions
|
|
@ -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(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue