I have a top level window that has been created using tkinter. When I set the geometry, the app is not positioned as I would expect.
import tkinter as tk
root = tk.Tk()
root.geometry("500x500+0+0")
root.mainloop()
After running the above code, the window is off by a small amount (7 pixels). I found this out by printing the x and y values after maximizing the window.
def print_coordinates_of_window_when_state_is_zoomed(root):
print(root.winfo_x()) # prints -7
print(root.winfo_y()) # prints 0
Is there a way to fix this? Alternatively, will any Windows PC have the same offset (i.e. -7)?