mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
Now using dimensions
This commit is contained in:
@@ -67,9 +67,12 @@ impl Window {
|
|||||||
|
|
||||||
// finally creating the window
|
// finally creating the window
|
||||||
let window = unsafe {
|
let window = unsafe {
|
||||||
let win = ffi::XCreateWindow(display, root, 10, 10, 800, 600,
|
let dimensions = dimensions.unwrap_or((800, 600));
|
||||||
0, (*visual_infos).depth, ffi::InputOutput, (*visual_infos).visual,
|
|
||||||
ffi::CWColormap | ffi::CWEventMask, &mut set_win_attr);
|
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
|
win
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user