Return the pointer’s coordinates as an (x, y) tuple, in pixels, relative to the screen’s root window (or virtual root, if one is in use). Both coordinates are -1 if the pointer is not on the same screen as the widget.
tkinter/Misc.winfo_pointerxy
Misc.winfo_pointerxy