aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2014-07-27 15:54:48 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2014-07-27 15:54:48 +0200
commitf29b2f91e1c0584d1f02346c9b93f8cfb0b7499d (patch)
treea3b8c0ed6058d9072397f4d2bf222b5ec8f5f570 /src
parent356394cc75f69f70f9ddf3d05ae9ef2567c95554 (diff)
downloadglutin-f29b2f91e1c0584d1f02346c9b93f8cfb0b7499d.tar.gz
glutin-f29b2f91e1c0584d1f02346c9b93f8cfb0b7499d.zip
Now using dimensions
Diffstat (limited to 'src')
-rw-r--r--src/x11/mod.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/x11/mod.rs b/src/x11/mod.rs
index d4b7da5..3478d8c 100644
--- a/src/x11/mod.rs
+++ b/src/x11/mod.rs
@@ -67,9 +67,12 @@ impl Window {
// finally creating the window
let window = unsafe {
- let win = ffi::XCreateWindow(display, root, 10, 10, 800, 600,
- 0, (*visual_infos).depth, ffi::InputOutput, (*visual_infos).visual,
- ffi::CWColormap | ffi::CWEventMask, &mut set_win_attr);
+ let dimensions = dimensions.unwrap_or((800, 600));
+
+ let win = ffi::XCreateWindow(display, root, 50, 50, dimensions.val0() as libc::c_uint,
+ dimensions.val1() as libc::c_uint, 0, (*visual_infos).depth, ffi::InputOutput,
+ (*visual_infos).visual, ffi::CWColormap | ffi::CWEventMask,
+ &mut set_win_attr);
win
};