aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/x11/ffi.rs1
-rw-r--r--src/x11/mod.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/x11/ffi.rs b/src/x11/ffi.rs
index ec5b69c..a31b9c2 100644
--- a/src/x11/ffi.rs
+++ b/src/x11/ffi.rs
@@ -1356,6 +1356,7 @@ extern "C" {
only_if_exists: Bool) -> Atom;
pub fn XKeycodeToKeysym(display: *mut Display, keycode: KeyCode,
index: libc::c_int) -> KeySym;
+ pub fn XMoveWindow(display: *mut Display, w: Window, x: libc::c_int, y: libc::c_int);
pub fn XMapWindow(display: *mut Display, w: Window);
pub fn XNextEvent(display: *mut Display, event_return: *mut XEvent);
pub fn XOpenDisplay(display_name: *const libc::c_char) -> *mut Display;
diff --git a/src/x11/mod.rs b/src/x11/mod.rs
index 580a897..0311b9a 100644
--- a/src/x11/mod.rs
+++ b/src/x11/mod.rs
@@ -197,7 +197,7 @@ impl Window {
}
pub fn set_position(&self, x: uint, y: uint) {
- unimplemented!()
+ unsafe { ffi::XMoveWindow(self.display, self.window, x as libc::c_int, y as libc::c_int) }
}
pub fn get_inner_size(&self) -> Option<(uint, uint)> {