aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2014-08-02 12:47:32 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2014-08-02 12:47:32 +0200
commiteee9e298babd8c67a9bba30ea47867471013230f (patch)
tree102d6a94e62e66ab54f6394f7b4912aeb1cf5366 /src
parentd08c94daac0853344f23fff255bd0248bf9deeb8 (diff)
downloadglutin-eee9e298babd8c67a9bba30ea47867471013230f.tar.gz
glutin-eee9e298babd8c67a9bba30ea47867471013230f.zip
Implement set_window_position for x11
Diffstat (limited to 'src')
-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)> {