When selecting a new piece, take into account the relative position of the mouse cursor.

This will prevent shifting when we start to move a piece.