fn reparent_initial_windows(_wm: &mut WindowManager) {
    unsafe {
        xlib::XGrabServer(_wm.display);

        let mut root: xlib::Window = uninitialized();
        let mut parent: xlib::Window = uninitialized();
        let mut windows: *mut xlib::Window = uninitialized();
        let mut count: u32 = 0;

        xlib::XQueryTree(
            _wm.display,
            _wm.root,
            &mut root,
            &mut parent,
            &mut windows,
            &mut count,
        );

        if root == _wm.root {
            debug!("Reparenting {} windows", count);

            for _i in 0..count {
                create_window_frame(_wm, *windows.offset(_i as isize), true);
            }
        }

        xlib::XFree(windows as *mut c_void);
        xlib::XUngrabServer(_wm.display);
    }
}
/**
 * Re-frames any windows that was spawned before the WM started up
 */
Re-frames any windows that was spawned before the WM started up
Re - frames any windows that was spawned before the WM started up
fn reparent_initial_windows(_wm: &mut WindowManager) {
    unsafe {
        xlib::XGrabServer(_wm.display);
        let mut root: xlib::Window = uninitialized();
        let mut parent: xlib::Window = uninitialized();
        let mut windows: *mut xlib::Window = uninitialized();
        let mut count: u32 = 0;
        xlib::XQueryTree(
            _wm.display,
            _wm.root,
            &mut root,
            &mut parent,
            &mut windows,
            &mut count,
        );
        if root == _wm.root {
            debug!("Reparenting {} windows", count);
            for _i in 0..count {
                create_window_frame(_wm, *windows.offset(_i as isize), true);
            }
        }
        xlib::XFree(windows as *mut c_void);
        xlib::XUngrabServer(_wm.display);
    }
}
fn reparent_initial_windows ( _wm : & mut WindowManager ) { unsafe { xlib :: XGrabServer ( _wm . display ) ; let mut root : xlib :: Window = uninitialized ( ) ; let mut parent : xlib :: Window = uninitialized ( ) ; let mut windows : * mut xlib :: Window = uninitialized ( ) ; let mut count : u32 = 0 ; xlib :: XQueryTree ( _wm . display , _wm . root , & mut root , & mut parent , & mut windows , & mut count , ) ; if root == _wm . root { debug ! ( " " count ) ; for _i in 0 .. count { create_window_frame ( _wm , * windows . offset ( _i as isize ) , true ) ; } } xlib :: XFree ( windows as * mut c_void ) ; xlib :: XUngrabServer ( _wm . display ) ; } }
Re-frames any windows that was spawned before the WM started up
Re - frames any windows that was spawned before the WM started up
_wm
&mut WindowManager
_wm
&mut WindowManager