Enable python3-style division.
Use more correct way to compute mouse coordinates.