I'm using the latest version of Mac OS, and Python 3.9. I tried using the overrideredirect to delete the title bar and add my own. However, the result does not show the window. The app is seen in the dock, and the menu bar. But it is not displayed.
My code:
from tkinter import *
root = Tk()
def move_window(event):
root.geometry('+{0}+{1}'.format(event.x_root, event.y_root))
root.overrideredirect(True)
root.geometry('400x100+200+200')
title_bar = Frame(root, bg='white', relief='raised', bd=2)
close_button = Button(title_bar, text='X', command=root.destroy)
window = Canvas(root, bg='black')
title_bar.pack(expand=1, fill=X)
close_button.pack(side=RIGHT)
window.pack(expand=1, fill=BOTH)
title_bar.bind('<B1-Motion>', move_window)
root.mainloop()
The same code works well in windows.
Thanks in advance! :)