aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-02-10 14:51:41 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-02-10 14:51:41 +0100
commit605bd37554655436841e4cd2c4fbb3d046de2330 (patch)
treee1e44fffe6a9f57287200c7079d4793632f8565c
parentc62f59712a88954bc145260133636720b5097e7f (diff)
parent4c8628ed6794f67f9cda3662028feed49fafbfa3 (diff)
downloadglutin-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.rs10
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) {