// We must use the `XAlloc..()` functions because the structs might be extended in the
// future and only the XAlloc* functions know how big they are.
// Silly if you ask me.
We must use the `XAlloc..()` functions because the structs might be extended in the
future and only the XAlloc* functions know how big they are.
Silly if you ask me.
We must use the ` XAlloc .. () ` functions because the structs might be extended in the future and only the XAlloc * functions know how big they are . Silly if you ask me .
fn x_set_wm_hints(&self, wm_hints: x::XWMHints) {
        let x_display = self.context.lock_x_display();
        unsafe {
            let mem = x::XAllocWMHints();
            assert_ne!(mem, ptr::null_mut());
            *mem = wm_hints;
            let status = xlib_error::sync_catch(*x_display, || {
                x::XSetWMHints(*x_display, self.x_window, mem)
            });
            x::XFree(mem as _);
            if let Err(e) = status {
                error!("XSetWMHints generated {}", e);
            }
        }
    }
fn x_set_wm_hints ( & self , wm_hints : x :: XWMHints ) { let x_display = self . context . lock_x_display ( ) ; unsafe { let mem = x :: XAllocWMHints ( ) ; assert_ne ! ( mem ptr null_mut ( ) ) ; * mem = wm_hints ; let status = xlib_error :: sync_catch ( * x_display , | | { x :: XSetWMHints ( * x_display , self . x_window , mem ) } ) ; x :: XFree ( mem as _ ) ; if let Err ( e ) = status { error ! ( " " e ) ; } } }
We must use the `XAlloc..()` functions because the structs might be extended in the
future and only the XAlloc* functions know how big they are.
We must use the ` XAlloc .. () ` functions because the structs might be extended in the future and only the XAlloc * functions know how big they are .
&self
wm_hints
x::XWMHints