aboutsummaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-07-24 09:24:18 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-07-24 09:24:18 +0200
commit8953eeb0508f557d3ca730b0033ceada1792522e (patch)
treed4e1e9e8be947ddd0976bdd7227cfbfbb2f35ba9 /src/api
parent20dbd2a8b04c07f67bf3aafcba6b07dce41addfe (diff)
parent6d6290df6ea138c168c89ee72d2e02ebd02b7948 (diff)
downloadglutin-8953eeb0508f557d3ca730b0033ceada1792522e.tar.gz
glutin-8953eeb0508f557d3ca730b0033ceada1792522e.zip
Merge pull request #539 from Daggerbot/pr-xresizewindow
Implement Window.set_inner_size on X11.
Diffstat (limited to 'src/api')
-rw-r--r--src/api/x11/window.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/x11/window.rs b/src/api/x11/window.rs
index 35b6a84..4e6e17e 100644
--- a/src/api/x11/window.rs
+++ b/src/api/x11/window.rs
@@ -202,7 +202,7 @@ impl<'a> Iterator for PollEventsIterator<'a> {
return Some(Refresh);
},
- ffi::KeyPress | ffi::KeyRelease => {
+ ffi::KeyPress | ffi::KeyRelease => {
let mut event: &mut ffi::XKeyEvent = unsafe { mem::transmute(&mut xev) };
let events = self.window.input_handler.lock().unwrap().translate_key_event(&mut event);
for event in events {
@@ -596,8 +596,8 @@ impl Window {
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) {
- unimplemented!()
+ pub fn set_inner_size(&self, x: u32, y: u32) {
+ unsafe { (self.x.display.xlib.XResizeWindow)(self.x.display.display, self.x.window, x as libc::c_uint, y as libc::c_uint); }
}
pub fn create_window_proxy(&self) -> WindowProxy {