diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-04-07 21:54:53 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-04-07 21:54:53 +0200 |
commit | 5a31b2e438a26fb29c7a93d7f47dec76228f1f7c (patch) | |
tree | 651b072d4fd547213a595ed14f67e54d82e6e2a9 /src/x11/window | |
parent | 68856c3addc4dd575967111a7064c6221fa930f1 (diff) | |
download | glutin-5a31b2e438a26fb29c7a93d7f47dec76228f1f7c.tar.gz glutin-5a31b2e438a26fb29c7a93d7f47dec76228f1f7c.zip |
Implement set_cursor_position() on X11
Diffstat (limited to 'src/x11/window')
-rw-r--r-- | src/x11/window/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index 7121ac6..d58b2d2 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -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(()) } } |