mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-09 21:01:29 +11:00
Now using dimensions
This commit is contained in:
parent
356394cc75
commit
f29b2f91e1
|
@ -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
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue