I put my Motorola XT912 (ICS) unlocked in my pocket and it started some kind of debug mode. There is bar on top which shows coordinates and every swipe is marked with a blue line.
I don't know how to turn it off, it's there even after reboot.
Go into Settings - Developer Options - scroll down to Input and turn off Pointer Location. I don't have a Moto phone (instructions based on Pixel 2 XL).