Added mouse limits

Automatically clamps mouse coordinates to within the bounds of the
primary display. This prevents out-of-bounds errors with mouse
positioning.