In some cases getWindowSize may not available.