Add function to resize active window