Function to get window size.