Fix a bug that mouse cannot work correctly when maximize the window from 1x window size.