Add function for resizing a window.