Allows cursor to move diagonally into corners.
Both x and y are adjusted to be on map