diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-02-10 14:51:41 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-02-10 14:51:41 +0100 |
commit | 605bd37554655436841e4cd2c4fbb3d046de2330 (patch) | |
tree | e1e44fffe6a9f57287200c7079d4793632f8565c | |
parent | c62f59712a88954bc145260133636720b5097e7f (diff) | |
parent | 4c8628ed6794f67f9cda3662028feed49fafbfa3 (diff) | |
download | glutin-605bd37554655436841e4cd2c4fbb3d046de2330.tar.gz glutin-605bd37554655436841e4cd2c4fbb3d046de2330.zip |
Merge pull request #267 from tomaka/x11-get-outer-size
Implement get_outer_size() on x11
-rw-r--r-- | src/x11/window/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index 74145f3..bcb8726 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -451,7 +451,7 @@ impl Window { } } - fn get_geometry(&self) -> Option<(i32, i32, u32, u32)> { + fn get_geometry(&self) -> Option<(i32, i32, u32, u32, u32)> { unsafe { use std::mem; @@ -470,12 +470,12 @@ impl Window { return None; } - Some((x as i32, y as i32, width as u32, height as u32)) + Some((x as i32, y as i32, width as u32, height as u32, border as u32)) } } pub fn get_position(&self) -> Option<(i32, i32)> { - self.get_geometry().map(|(x, y, _, _)| (x, y)) + self.get_geometry().map(|(x, y, _, _, _)| (x, y)) } pub fn set_position(&self, x: i32, y: i32) { @@ -483,11 +483,11 @@ impl Window { } pub fn get_inner_size(&self) -> Option<(u32, u32)> { - self.get_geometry().map(|(_, _, w, h)| (w, h)) + self.get_geometry().map(|(_, _, w, h, _)| (w, h)) } pub fn get_outer_size(&self) -> Option<(u32, u32)> { - unimplemented!() + self.get_geometry().map(|(_, _, w, h, b)| (w + b, h + b)) // TODO: is this really outside? } pub fn set_inner_size(&self, _x: u32, _y: u32) { |