Fix an offset issue when the application is in fullscreen mode.