Some more code for the window manager