Listen to the window resizing event