Pointer location detection