diff --git a/src/x11/ffi.rs b/src/x11/ffi.rs index ec5b69c9..a31b9c2b 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 580a8974..0311b9ad 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)> {