Move the result window if fully or partially off-screen. Fix #521. Need to verify if this solves #500.