I tried to see the difference between a window coordinate and a canvas coordinate by giving a canvas a callback that prints the coordinates of a mouse click in both types. I expected the two types of coordinates to have different values, but they didn't. Also, I tried to pass window coordinates to the find_closest method which, as stated in the documentation, accepts canvas coordinates, and there was no error.
import tkinter as tk
def callback(event):
canvas = event.widget
print()
print("Window x-coordinate:", event.x)
print("Window y-coordinate:", event.y)
x = canvas.canvasx(event.x)
y = canvas.canvasy(event.y)
print("Canvas x-coordinate:", x)
print("Canvas y-coordinate:", y)
print("closest:", canvas.find_closest(x, y))
master = tk.Tk()
frame = tk.Frame(master, width=50, height=50, bd=5, bg="green", relief="groove")
frame.pack_propagate(0)
frame.pack()
button = tk.Button(frame)
button.pack(fill="none")
canvas = tk.Canvas(master, bd=5, width=50, height=50, bg="red", relief="ridge")
canvas.bind("<Button-1>", callback)
canvas.pack_propagate(0)
canvas.pack()
master.mainloop()