mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 06:41:31 +11:00
Minor style fix in X11
This commit is contained in:
parent
c7aa219ef1
commit
2184e5e578
|
@ -40,7 +40,6 @@ impl Window {
|
||||||
pub fn new(builder: WindowBuilder) -> Result<Window, String> {
|
pub fn new(builder: WindowBuilder) -> Result<Window, String> {
|
||||||
// TODO: temporary
|
// TODO: temporary
|
||||||
let dimensions = builder.dimensions;
|
let dimensions = builder.dimensions;
|
||||||
let title = builder.title.as_slice();
|
|
||||||
|
|
||||||
// calling XOpenDisplay
|
// calling XOpenDisplay
|
||||||
let display = unsafe {
|
let display = unsafe {
|
||||||
|
@ -134,7 +133,7 @@ impl Window {
|
||||||
let mut wm_delete_window = ffi::XInternAtom(display,
|
let mut wm_delete_window = ffi::XInternAtom(display,
|
||||||
"WM_DELETE_WINDOW".to_c_str().as_ptr() as *const libc::c_char, 0);
|
"WM_DELETE_WINDOW".to_c_str().as_ptr() as *const libc::c_char, 0);
|
||||||
ffi::XSetWMProtocols(display, window, &mut wm_delete_window, 1);
|
ffi::XSetWMProtocols(display, window, &mut wm_delete_window, 1);
|
||||||
ffi::XStoreName(display, window, mem::transmute(title.as_slice().as_ptr()));
|
ffi::XStoreName(display, window, mem::transmute(builder.title.as_slice().as_ptr()));
|
||||||
ffi::XFlush(display);
|
ffi::XFlush(display);
|
||||||
|
|
||||||
wm_delete_window
|
wm_delete_window
|
||||||
|
|
Loading…
Reference in a new issue