diff options
-rw-r--r-- | src/x11/mod.rs | 9 |
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 }; |