Tkinter Entry Widget with Overrideredirect and Fullscreen Tkinter Entry Widget with Overrideredirect and Fullscreen tkinter tkinter

Tkinter Entry Widget with Overrideredirect and Fullscreen


I see a red flag in your code that should be fixed (it won't solve your problem, but it's free advice). You're passing in root to you admin method, and then you're calling Tk() again to create the toplevel that you're working with. This is not a good practice. Just use the command Toplevel. See my sample code below.

The posts you've seen are consistent (and correct apparently) for the MAC regarding overrideredirect. This attribute on a toplevel window tells the window manager to ignore some events on unparented windows. Apparently, the MAC does not send keypress and release events to widgets within an unparented toplevel window.

One workaround for this would be to allow the window to be parented (normal), but set the "WM_DELETE_WINDOW" protocol to a function or method to intercept window closure. I'm only posting the top portion of your admin method.

def admin(self, root_1):    master = Toplevel()    text = ""    master.title("Administrator Login")    w_0, h_0 = master.winfo_screenwidth(), master.winfo_screenheight()    master.geometry("%dx%d+0+0" % (w_0, h_0))    master.protocol("WM_DELETE_WINDOW", self.dontDeleteWindow)def dontDeleteWindow(self):    print("User tied to close window")