Return the pointer’s x coordinate, in pixels, relative to the screen’s root window (or virtual root, if one is in use). Return -1 if the pointer is not on the same screen as the widget.
tkinter/Misc.winfo_pointerx
Misc.winfo_pointerx